{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "fc2fe2b6",
   "metadata": {},
   "source": [
    "## 基本思路"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f7eb91bb",
   "metadata": {},
   "source": [
    "|**步骤**|任务|说明|方法|\n",
    "|:----:|:----:|:-----|:----:|\n",
    "|**1**|**生成网址**|分析<mark>网址规律</mark>，批量生成网址|for循环，format函数|\n",
    "|2|请求+获取网页数据|模拟人工打开网页，并将网页存储为数据对象|requests包|\n",
    "|**3**|**解析数据**|分析数据规律，整理出所需字段|<mark>pyquery包</mark>，json包<br>（还有<mark>lxml包和beautifulsoup4包</mark>）|\n",
    "|4|存储数据|使用csv包将数据存储到csv文件中|csv包|\n",
    "|5|批量爬取|对所有网址循环步骤2-4|for循环|"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6e2ae767",
   "metadata": {},
   "source": [
    "# 生成网址"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "294c6623",
   "metadata": {},
   "source": [
    "## 分析网址规律"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c6b59250",
   "metadata": {},
   "source": [
    "1. **```任务对象```**：\n",
    "    - https://book.douban.com/top250<br>\n",
    "<br>\n",
    "<br>\n",
    "2. **```基本情况```**：\n",
    "    - 每翻一页，网址中的某个**<u>```数字发生规律性变化```</u>**\n",
    "    - 每页25本书的信息，一共10页"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "490cdfb0",
   "metadata": {},
   "source": [
    "3. **```规律```**：\n",
    "- **<u>```原网址```</u>**：\n",
    "    * https://book.douban.com/top250?start=0\n",
    "    * https://book.douban.com/top250?start=25\n",
    "    * https://book.douban.com/top250?start=50\n",
    "\n",
    "    * ……\n",
    "    * https://book.douban.com/top250?start=225"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- ```总结规律```：\n",
    "    - 第1页，数字为0\n",
    "    - 第2页，数字为25\n",
    "    - 第3页，数字为50\n",
    "    - ……\n",
    "    - 第10页，数字为225\n",
    "<br>\n",
    "<br>\n",
    "    - <mark><big>第p页，数字为(p-1)*25</big></mark>"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6ab62d68",
   "metadata": {},
   "source": [
    "## 批量生成网址"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "8cb53376",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:04:09.548621Z",
     "start_time": "2023-08-08T18:04:09.539133Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'https://book.douban.com/top250?start=100'"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 尝试用format替换数字\n",
    "'https://book.douban.com/top250?start={num}'.format(num=100)\n",
    "# 'https://book.douban.com/top250?start={num}'.format(num=0)   # num取0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "bac5a9e7",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:04:16.047085Z",
     "start_time": "2023-08-08T18:04:16.039074Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'https://book.douban.com/top250?start=25'"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "'https://book.douban.com/top250?start={num}'.format(num=25)  # num取25"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c97f7aa6",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:06:06.289042Z",
     "start_time": "2023-08-08T18:06:06.282715Z"
    }
   },
   "outputs": [],
   "source": [
    "# 简写\n",
    "template = 'https://book.douban.com/top250?start={num}'\n",
    "template.format(num=25)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "9d6b7cdc",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:06:07.043933Z",
     "start_time": "2023-08-08T18:06:07.036924Z"
    }
   },
   "outputs": [],
   "source": [
    "# 循环生成网址，并存入网址列表中\n",
    "url_list = []    # 生成空列表，用于存储网址\n",
    "template = 'https://book.douban.com/top250?start={num}'\n",
    "for p in range(1,11):   # range取1到10\n",
    "    url = template.format(num=(p-1)*25)    # 取1时，为(1-1)*25，即num为0，以此类推\n",
    "    url_list.append(url)   # 将上面获得的url【添加进】列表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "c7e65a26",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:06:08.684675Z",
     "start_time": "2023-08-08T18:06:08.677693Z"
    },
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['https://book.douban.com/top250?start=0',\n",
       " 'https://book.douban.com/top250?start=25',\n",
       " 'https://book.douban.com/top250?start=50',\n",
       " 'https://book.douban.com/top250?start=75',\n",
       " 'https://book.douban.com/top250?start=100',\n",
       " 'https://book.douban.com/top250?start=125',\n",
       " 'https://book.douban.com/top250?start=150',\n",
       " 'https://book.douban.com/top250?start=175',\n",
       " 'https://book.douban.com/top250?start=200',\n",
       " 'https://book.douban.com/top250?start=225']"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 查看url_list情况（获得10页的网址）\n",
    "url_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "3a6ceb20",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:07:33.907385Z",
     "start_time": "2023-08-08T18:07:33.901840Z"
    }
   },
   "outputs": [],
   "source": [
    "# 函数：生成网址  \n",
    "# 返回值：url_list为网址列表\n",
    "def generate_url():   # 添加：定义函数名\n",
    "    url_list = []\n",
    "    template = 'https://book.douban.com/top250?start={num}'\n",
    "    for p in range(1,11):\n",
    "        url = template.format(num=(p-1)*25)\n",
    "        url_list.append(url)\n",
    "    return url_list        # 添加：返回网址列表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "b66e341e",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:07:34.601052Z",
     "start_time": "2023-08-08T18:07:34.594291Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['https://book.douban.com/top250?start=0',\n",
       " 'https://book.douban.com/top250?start=25',\n",
       " 'https://book.douban.com/top250?start=50',\n",
       " 'https://book.douban.com/top250?start=75',\n",
       " 'https://book.douban.com/top250?start=100',\n",
       " 'https://book.douban.com/top250?start=125',\n",
       " 'https://book.douban.com/top250?start=150',\n",
       " 'https://book.douban.com/top250?start=175',\n",
       " 'https://book.douban.com/top250?start=200',\n",
       " 'https://book.douban.com/top250?start=225']"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用函数  generate_url\n",
    "url_list_tmp = generate_url()\n",
    "url_list_tmp"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "51dc462d",
   "metadata": {},
   "source": [
    "# 请求+获取网页数据\t"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fcfb775c",
   "metadata": {},
   "source": [
    "- 以第1页为例，来请求并获取网页数据\n",
    "- 例子：https://book.douban.com/top250?start=0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "cf91a1e3",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:08:35.325763Z",
     "start_time": "2023-08-08T18:08:35.128751Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [418]>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import requests   # 导入requests包\n",
    "\n",
    "url = 'https://book.douban.com/top250'\n",
    "resp = requests.get(url)   # 用get向服务器请求获取数据\n",
    "resp # 查看状态码，返回码418说明访问不成功，需要伪装访问，假装是人工打开网页"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "86c3d7a9",
   "metadata": {},
   "source": [
    "##  1. **状态码**：\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "    * 1开头：信息状态码\n",
    "    * 2开头：成功状态码\n",
    "    * 3开头：重定向状态码\n",
    "    * 4开头：客户端错误状态码\n",
    "    * 5开头：服务端错误状态码"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "3ec1949a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "''"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "resp.text"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "82699404",
   "metadata": {},
   "source": [
    "## 2. **```应对方式```**："
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "加入请求头headers，一般包括user-agent、cookie和referer等\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- ```user-agent```：浏览器类型及版本、操作系统及版本、浏览器内核等的信息标识\n",
    "- ```cookie```：用于识别用户身份、记录历史的一段数据（浏览器访问服务器后，服务器传给浏览器的）\n",
    "- ```referer```：告诉服务器该网页是从哪个页面链接过来的"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "abf0e78f",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:10:00.695696Z",
     "start_time": "2023-08-08T18:09:59.987096Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 尝试加入user-agent\n",
    "headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) \\\n",
    "            AppleWebKit/537.36 (KHTML, like Gecko) \\\n",
    "           Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0'}\n",
    "resp = requests.get(url, headers=headers)  # 设置参数headers\n",
    "resp #返回码200说明访问成功"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "ca70c4b8",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:10:08.984050Z",
     "start_time": "2023-08-08T18:10:08.975976Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'\\n\\n<!DOCTYPE html>\\n<html lang=\"zh-cmn-Hans\" class=\"ua-windows ua-webkit book-new-nav\">\\n<head>\\n  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\\n  <title>豆瓣读书 Top 250</title>\\n  \\n<script>!function(e){var o=function(o,n,t){var c,i,r=new Date;n=n||30,t=t||\"/\",r.setTime(r.getTime()+24*n*60*60*1e3),c=\"; expires=\"+r.toGMTString();for(i in o)e.cookie=i+\"=\"+o[i]+c+\"; path=\"+t},n=function(o){var n,t,c,i=o+\"=\",r=e.cookie.split(\";\");for(t=0,c=r.length;t<c;t++)if(n=r[t].replace(/^\\\\s+|\\\\s+$/g,\"\"),0==n.indexOf(i))return n.substring(i.length,n.length).replace(/\\\\\"/g,\"\");return null},t=e.write,c={\"douban.com\":1,\"douban.fm\":1,\"google.com\":1,\"google.cn\":1,\"googleapis.com\":1,\"gmaptiles.co.kr\":1,\"gstatic.com\":1,\"gstatic.cn\":1,\"google-analytics.com\":1,\"googleadservices.com\":1},i=function(e,o){var n=new Image;n.onload=function(){},n.src=\"https://www.douban.com/j/except_report?kind=ra022&reason=\"+encodeURIComponent(e)+\"&environment=\"+encodeURIComponent(o)},r=function(o){try{t.call(e,o)}catch(e){t(o)}},a=/<script.*?src\\\\=[\"\\']?([^\"\\'\\\\s>]+)/gi,g=/http:\\\\/\\\\/(.+?)\\\\.([^\\\\/]+).+/i;e.writeln=e.write=function(e){var t,l=a.exec(e);return l&&(t=g.exec(l[1]))?c[t[2]]?void r(e):void(\"tqs\"!==n(\"hj\")&&(i(l[1],location.href),o({hj:\"tqs\"},1),setTimeout(function(){location.replace(location.href)},50))):void r(e)}}(document);</script>\\n\\n  \\n  <meta http-equiv=\"Pragma\" content=\"no-cache\">\\n  <meta http-equiv=\"Expires\" content=\"Sun, 6 Mar 2005 01:00:00 GMT\">\\n  \\n  <script>var _head_start = new Date();</script>\\n  \\n  <link href=\"https://img1.doubanio.com/f/vendors/02814fbb5bee25484516bd0a642af695f7ec5a83/css/douban.css\" rel=\"stylesheet\" type=\"text/css\">\\n  <link href=\"https://img9.doubanio.com/cuphead/book-static/common/master.2f364.css\" rel=\"stylesheet\" type=\"text/css\">\\n\\n  <link href=\"https://img2.doubanio.com/cuphead/book-static/base/init.e399f.css\" rel=\"stylesheet\">\\n  <style type=\"text/css\"></style>\\n  <script src=\"https://img1.doubanio.com/f/vendors/0511abe9863c2ea7084efa7e24d1d86c5b3974f1/js/jquery-1.10.2.min.js\"></script>\\n  <script src=\"https://img1.doubanio.com/f/vendors/aa9559674f2476cdc16f755b3cdc4ebc478db669/js/douban.js\"></script>\\n  <script src=\"https://img1.doubanio.com/cuphead/book-static/common/master.307d7.js\"></script>\\n  \\n\\n  \\n  <script>  </script>\\n  <!-- COLLECTED CSS -->\\n\\n  <link rel=\"shortcut icon\" href=\"https://img1.doubanio.com/favicon.ico\" type=\"image/x-icon\">\\n</head>\\n<body>\\n  \\n    <script>var _body_start = new Date();</script>\\n    \\n  \\n\\n\\n\\n    <link href=\"//img3.doubanio.com/dae/accounts/resources/164cfd8/shire/bundle.css\" rel=\"stylesheet\" type=\"text/css\">\\n\\n\\n\\n<div id=\"db-global-nav\" class=\"global-nav\">\\n  <div class=\"bd\">\\n    \\n<div class=\"top-nav-info\">\\n  <a href=\"https://accounts.douban.com/passport/login?source=book\" class=\"nav-login\" rel=\"nofollow\">登录/注册</a>\\n</div>\\n\\n\\n    <div class=\"top-nav-doubanapp\">\\n  <a href=\"https://www.douban.com/doubanapp/app?channel=top-nav\" class=\"lnk-doubanapp\">下载豆瓣客户端</a>\\n  <div id=\"doubanapp-tip\">\\n    <a href=\"https://www.douban.com/doubanapp/app?channel=qipao\" class=\"tip-link\">豆瓣 <span class=\"version\">6.0</span> 全新发布</a>\\n    <a href=\"javascript: void 0;\" class=\"tip-close\">×</a>\\n  </div>\\n  <div id=\"top-nav-appintro\" class=\"more-items\">\\n    <p class=\"appintro-title\">豆瓣</p>\\n    <p class=\"qrcode\">扫码直接下载</p>\\n    <div class=\"download\">\\n      <a href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&direct_dl=1&download=iOS\">iPhone</a>\\n      <span>·</span>\\n      <a href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&direct_dl=1&download=Android\" class=\"download-android\">Android</a>\\n    </div>\\n  </div>\\n</div>\\n\\n    \\n\\n\\n<div class=\"global-nav-items\">\\n  <ul>\\n    <li class=\"\">\\n      <a href=\"https://www.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-main&quot;,&quot;uid&quot;:&quot;0&quot;}\">豆瓣</a>\\n    </li>\\n    <li class=\"on\">\\n      <a href=\"https://book.douban.com\"  data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-book&quot;,&quot;uid&quot;:&quot;0&quot;}\">读书</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://movie.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-movie&quot;,&quot;uid&quot;:&quot;0&quot;}\">电影</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://music.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-music&quot;,&quot;uid&quot;:&quot;0&quot;}\">音乐</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://www.douban.com/location\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-location&quot;,&quot;uid&quot;:&quot;0&quot;}\">同城</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://www.douban.com/group\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-group&quot;,&quot;uid&quot;:&quot;0&quot;}\">小组</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://read.douban.com&#47;?dcs=top-nav&amp;dcm=douban\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-read&quot;,&quot;uid&quot;:&quot;0&quot;}\">阅读</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://fm.douban.com&#47;?from_=shire_top_nav\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-fm&quot;,&quot;uid&quot;:&quot;0&quot;}\">FM</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://time.douban.com&#47;?dt_time_source=douban-web_top_nav\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-time&quot;,&quot;uid&quot;:&quot;0&quot;}\">时间</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://market.douban.com&#47;?utm_campaign=douban_top_nav&amp;utm_source=douban&amp;utm_medium=pc_web\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-market&quot;,&quot;uid&quot;:&quot;0&quot;}\">豆品</a>\\n    </li>\\n  </ul>\\n</div>\\n\\n  </div>\\n</div>\\n<script>\\n  ;window._GLOBAL_NAV = {\\n    DOUBAN_URL: \"https://www.douban.com\",\\n    N_NEW_NOTIS: 0,\\n    N_NEW_DOUMAIL: 0\\n  };\\n</script>\\n\\n\\n\\n    <script src=\"//img3.doubanio.com/dae/accounts/resources/164cfd8/shire/bundle.js\" defer=\"defer\"></script>\\n\\n\\n\\n\\n  \\n\\n\\n\\n    <link href=\"//img3.doubanio.com/dae/accounts/resources/164cfd8/book/bundle.css\" rel=\"stylesheet\" type=\"text/css\">\\n\\n\\n\\n\\n<div id=\"db-nav-book\" class=\"nav\">\\n  <div class=\"nav-wrap\">\\n  <div class=\"nav-primary\">\\n    <div class=\"nav-logo\">\\n      <a href=\"https:&#47;&#47;book.douban.com\">豆瓣读书</a>\\n    </div>\\n    <div class=\"nav-search\">\\n      <form action=\"https:&#47;&#47;search.douban.com&#47;book/subject_search\" method=\"get\">\\n        <fieldset>\\n          <legend>搜索：</legend>\\n          <label for=\"inp-query\">\\n          </label>\\n          <div class=\"inp\"><input id=\"inp-query\" name=\"search_text\" size=\"22\" maxlength=\"60\" placeholder=\"书名、作者、ISBN\" value=\"\"></div>\\n          <div class=\"inp-btn\"><input type=\"submit\" value=\"搜索\"></div>\\n          <input type=\"hidden\" name=\"cat\" value=\"1001\" />\\n        </fieldset>\\n      </form>\\n    </div>\\n  </div>\\n  </div>\\n  <div class=\"nav-secondary\">\\n    \\n\\n<div class=\"nav-items\">\\n  <ul>\\n    <li    ><a href=\"https://book.douban.com/cart/\"\\n     >购书单</a>\\n    </li>\\n    <li    ><a href=\"https://read.douban.com/ebooks/?dcs=book-nav&dcm=douban\"\\n            target=\"_blank\"\\n     >电子图书</a>\\n    </li>\\n    <li    ><a href=\"https://market.douban.com/book?utm_campaign=book_nav_freyr&utm_source=douban&utm_medium=pc_web\"\\n     >豆瓣书店</a>\\n    </li>\\n    <li    ><a href=\"https://book.douban.com/annual/2022?fullscreen=1&source=navigation\"\\n            target=\"_blank\"\\n     >2022年度榜单</a>\\n    </li>\\n    <li    ><a href=\"https://standbyme2022.douban.com/?autorotate=false&fullscreen=true&hidenav=true&source=web_navigation\"\\n            target=\"_blank\"\\n     >2022书影音报告</a>\\n    </li>\\n    <li          class=\" book-cart\"\\n    ><a href=\"https://market.douban.com/cart/?biz_type=book&utm_campaign=book_nav_cart&utm_source=douban&utm_medium=pc_web\"\\n            target=\"_blank\"\\n     >购物车</a>\\n    </li>\\n  </ul>\\n</div>\\n\\n    <a href=\"https://book.douban.com/annual/2022?fullscreen=1&source=book_navigation\" class=\"bookannual\"></a>\\n  </div>\\n</div>\\n\\n<script id=\"suggResult\" type=\"text/x-jquery-tmpl\">\\n  <li data-link=\"{{= url}}\">\\n            <a href=\"{{= url}}\" onclick=\"moreurl(this, {from:\\'book_search_sugg\\', query:\\'{{= keyword }}\\', subject_id:\\'{{= id}}\\', i: \\'{{= index}}\\', type: \\'{{= type}}\\'})\">\\n            <img src=\"{{= pic}}\" width=\"40\" />\\n            <div>\\n                <em>{{= title}}</em>\\n                {{if year}}\\n                    <span>{{= year}}</span>\\n                {{/if}}\\n                <p>\\n                {{if type == \"b\"}}\\n                    {{= author_name}}\\n                {{else type == \"a\" }}\\n                    {{if en_name}}\\n                        {{= en_name}}\\n                    {{/if}}\\n                {{/if}}\\n                 </p>\\n            </div>\\n        </a>\\n        </li>\\n  </script>\\n\\n\\n\\n\\n    <script src=\"//img3.doubanio.com/dae/accounts/resources/164cfd8/book/bundle.js\" defer=\"defer\"></script>\\n\\n\\n\\n\\n\\n    <div id=\"wrapper\">\\n        \\n        \\n  <div id=\"content\">\\n    \\n    <h1>豆瓣读书 Top 250</h1>\\n\\n    <div class=\"grid-16-8 clearfix\">\\n      \\n      <div class=\"article\">\\n  <div class=\"indent\">\\n    \\n  \\n\\n        <p class=\"ulfirst\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1007305/\"\\n              onclick=\"moreurl(this,{i:\\'0\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1070959.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1007305/\" onclick=&#34;moreurl(this,{i:&#39;0&#39;})&#34; title=\"红楼梦\"\\n                \\n              >\\n                红楼梦\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">[清] 曹雪芹 著 / 人民文学出版社 / 1996-12 / 59.70元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar50\"></span>\\n                  <span class=\"rating_nums\">9.6</span>\\n\\n                <span class=\"pl\">(\\n                    414261人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">都云作者痴，谁解其中味？</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/4913064/\"\\n              onclick=\"moreurl(this,{i:\\'1\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s29053580.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/4913064/\" onclick=&#34;moreurl(this,{i:&#39;1&#39;})&#34; title=\"活着\"\\n                \\n              >\\n                活着\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">余华 / 作家出版社 / 2012-8-1 / 20.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.4</span>\\n\\n                <span class=\"pl\">(\\n                    807701人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">生的苦难与伟大</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/4820710/\"\\n              onclick=\"moreurl(this,{i:\\'2\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s4371408.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/4820710/\" onclick=&#34;moreurl(this,{i:&#39;2&#39;})&#34; title=\"1984\"\\n                \\n              >\\n                1984\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Nineteen Eighty-Four</span>\\n            </div>\\n\\n              <p class=\"pl\">[英] 乔治·奥威尔 / 刘绍铭 / 北京十月文艺出版社 / 2010-4-1 / 28.00</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.4</span>\\n\\n                <span class=\"pl\">(\\n                    276178人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">栗树荫下，我出卖你，你出卖我</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/6518605/\"\\n              onclick=\"moreurl(this,{i:\\'3\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s30016152.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/6518605/\" onclick=&#34;moreurl(this,{i:&#39;3&#39;})&#34; title=\"三体全集\"\\n                \\n              >\\n                三体全集\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 地球往事三部曲 </span>\\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">刘慈欣 / 重庆出版社 / 2012-1 / 168.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar50\"></span>\\n                  <span class=\"rating_nums\">9.5</span>\\n\\n                <span class=\"pl\">(\\n                    178576人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">地球往事三部曲</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/24531956/\"\\n              onclick=\"moreurl(this,{i:\\'4\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s29101586.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/24531956/\" onclick=&#34;moreurl(this,{i:&#39;4&#39;})&#34; title=\"哈利·波特\"\\n                \\n              >\\n                哈利·波特\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Harry Potter</span>\\n            </div>\\n\\n              <p class=\"pl\">J.K.罗琳 (J.K.Rowling) / 苏农 / 人民文学出版社 / 2008-12-1 / 498.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar50\"></span>\\n                  <span class=\"rating_nums\">9.7</span>\\n\\n                <span class=\"pl\">(\\n                    99734人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">从9¾站台开始的旅程</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/6082808/\"\\n              onclick=\"moreurl(this,{i:\\'5\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s27237850.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/6082808/\" onclick=&#34;moreurl(this,{i:&#39;5&#39;})&#34; title=\"百年孤独\"\\n                \\n              >\\n                百年孤独\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Cien años de soledad</span>\\n            </div>\\n\\n              <p class=\"pl\">[哥伦比亚] 加西亚·马尔克斯 / 范晔 / 南海出版公司 / 2011-6 / 39.50元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    415128人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">魔幻现实主义文学代表作</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1068920/\"\\n              onclick=\"moreurl(this,{i:\\'6\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1078958.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1068920/\" onclick=&#34;moreurl(this,{i:&#39;6&#39;})&#34; title=\"飘\"\\n                \\n              >\\n                飘\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Gone with the Wind</span>\\n            </div>\\n\\n              <p class=\"pl\">[美国] 玛格丽特·米切尔 / 李美华 / 译林出版社 / 2000-9 / 40.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    208601人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">革命时期的爱情，随风而逝</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/27614904/\"\\n              onclick=\"moreurl(this,{i:\\'7\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s29651121.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/27614904/\" onclick=&#34;moreurl(this,{i:&#39;7&#39;})&#34; title=\"房思琪的初恋乐园\"\\n                \\n              >\\n                房思琪的初恋乐园\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">林奕含 / 北京联合出版公司 / 2018-2 / 45.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    367291人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">向死而生的文学绝唱</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1019568/\"\\n              onclick=\"moreurl(this,{i:\\'8\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1076932.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1019568/\" onclick=&#34;moreurl(this,{i:&#39;8&#39;})&#34; title=\"三国演义（全二册）\"\\n                \\n              >\\n                三国演义（全二册）\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">[明] 罗贯中 / 人民文学出版社 / 1998-05 / 39.50元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    164407人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">是非成败转头空</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/2035179/\"\\n              onclick=\"moreurl(this,{i:\\'9\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s2347590.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/2035179/\" onclick=&#34;moreurl(this,{i:&#39;9&#39;})&#34; title=\"动物农场\"\\n                \\n              >\\n                动物农场\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Animal Farm</span>\\n            </div>\\n\\n              <p class=\"pl\">[英] 乔治·奥威尔 / 荣如德 / 上海译文出版社 / 2007-3 / 10.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    154517人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">太阳底下并无新事</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1040211/\"\\n              onclick=\"moreurl(this,{i:\\'10\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1229240.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1040211/\" onclick=&#34;moreurl(this,{i:&#39;10&#39;})&#34; title=\"福尔摩斯探案全集（上中下）\"\\n                \\n              >\\n                福尔摩斯探案全集（上中下）\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">[英] 阿·柯南道尔 / 丁钟华 等 / 群众出版社 / 1981-8 / 53.00元/68.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    130538人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">名侦探的代名词</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/10554308/\"\\n              onclick=\"moreurl(this,{i:\\'11\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s24514468.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/10554308/\" onclick=&#34;moreurl(this,{i:&#39;11&#39;})&#34; title=\"白夜行\"\\n                \\n              >\\n                白夜行\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">[日] 东野圭吾 / 刘姿君 / 南海出版公司 / 2013-1-1 / 39.50元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    459198人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">一宗离奇命案牵出跨度近20年步步惊心的故事</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1084336/\"\\n              onclick=\"moreurl(this,{i:\\'12\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1103152.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1084336/\" onclick=&#34;moreurl(this,{i:&#39;12&#39;})&#34; title=\"小王子\"\\n                \\n              >\\n                小王子\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Le Petit Prince</span>\\n            </div>\\n\\n              <p class=\"pl\">[法] 圣埃克苏佩里 / 马振聘 / 人民文学出版社 / 2003-8 / 22.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.1</span>\\n\\n                <span class=\"pl\">(\\n                    743613人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">献给长成了大人的孩子们</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1046209/\"\\n              onclick=\"moreurl(this,{i:\\'13\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1034062.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1046209/\" onclick=&#34;moreurl(this,{i:&#39;13&#39;})&#34; title=\"安徒生童话故事集\"\\n                \\n              >\\n                安徒生童话故事集\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">（丹麦）安徒生 / 叶君健 / 人民文学出版社 / 1997-08 / 25.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    129244人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">为了争取未来的一代</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1060068/\"\\n              onclick=\"moreurl(this,{i:\\'14\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1369343.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1060068/\" onclick=&#34;moreurl(this,{i:&#39;14&#39;})&#34; title=\"撒哈拉的故事\"\\n                \\n              >\\n                撒哈拉的故事\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">三毛 / 哈尔滨出版社 / 2003-8 / 15.80元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    168076人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">游荡的自由灵魂</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1255625/\"\\n              onclick=\"moreurl(this,{i:\\'15\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s26018275.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1255625/\" onclick=&#34;moreurl(this,{i:&#39;15&#39;})&#34; title=\"天龙八部\"\\n                \\n              >\\n                天龙八部\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">金庸 / 生活·读书·新知三联书店 / 1994-5 / 96.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    130467人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">有情皆孽，无人不冤</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1449351/\"\\n              onclick=\"moreurl(this,{i:\\'16\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s34099286.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1449351/\" onclick=&#34;moreurl(this,{i:&#39;16&#39;})&#34; title=\"呐喊\"\\n                \\n              >\\n                呐喊\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">鲁迅 / 人民文学出版社 / 1973-3 / 0.36元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    155675人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">新文学的第一声呐喊</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/6781808/\"\\n              onclick=\"moreurl(this,{i:\\'17\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s23128183.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/6781808/\" onclick=&#34;moreurl(this,{i:&#39;17&#39;})&#34; title=\"杀死一只知更鸟\"\\n                \\n              >\\n                杀死一只知更鸟\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">To Kill a Mocking Bird</span>\\n            </div>\\n\\n              <p class=\"pl\">[美] 哈珀·李 / 高红梅 / 译林出版社 / 2012-9 / 32.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    142061人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">有一种东西不能遵循从众原则，那就是——人的良心</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/26980487/\"\\n              onclick=\"moreurl(this,{i:\\'18\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s29396368.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/26980487/\" onclick=&#34;moreurl(this,{i:&#39;18&#39;})&#34; title=\"悉达多\"\\n                \\n              >\\n                悉达多\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 一首印度的诗 </span>\\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Siddhartha</span>\\n            </div>\\n\\n              <p class=\"pl\">[德] 赫尔曼·黑塞 / 姜乙 / 天津人民出版社 / 2017-1 / 32.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    87866人评价\\n                )</span>\\n              </div>\\n\\n            \\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/20424526/\"\\n              onclick=\"moreurl(this,{i:\\'19\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s24516687.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/20424526/\" onclick=&#34;moreurl(this,{i:&#39;19&#39;})&#34; title=\"邓小平时代\"\\n                \\n              >\\n                邓小平时代\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Deng Xiaoping and the Transformation of China</span>\\n            </div>\\n\\n              <p class=\"pl\">【美】傅高义 (Ezra.F.Vogel) / 冯克利 / 生活·读书·新知三联书店 / 2013-1-18 / 88.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    66101人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">个人命运背后的历史变局</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/3674537/\"\\n              onclick=\"moreurl(this,{i:\\'20\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s3745215.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/3674537/\" onclick=&#34;moreurl(this,{i:&#39;20&#39;})&#34; title=\"明朝那些事儿（1-9）\"\\n                \\n              >\\n                明朝那些事儿（1-9）\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 限量版 </span>\\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">当年明月 / 中国海关出版社 / 2009-4 / 358.20元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    166690人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">不拘一格的历史书写</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/30172069/\"\\n              onclick=\"moreurl(this,{i:\\'21\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s29799269.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/30172069/\" onclick=&#34;moreurl(this,{i:&#39;21&#39;})&#34; title=\"失踪的孩子\"\\n                \\n              >\\n                失踪的孩子\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 那不勒斯四部曲4 </span>\\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Storia della bambina perduta</span>\\n            </div>\\n\\n              <p class=\"pl\">[意] 埃莱娜·费兰特 / 陈英 / 人民文学出版社 / 2018-7 / 62.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    76987人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">我的整个生命，只是一场为了提升社会地位的低俗斗争。</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/26986954/\"\\n              onclick=\"moreurl(this,{i:\\'22\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s29376146.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/26986954/\" onclick=&#34;moreurl(this,{i:&#39;22&#39;})&#34; title=\"新名字的故事\"\\n                \\n              >\\n                新名字的故事\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 那不勒斯四部曲2 </span>\\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Storia del nuovo cognome</span>\\n            </div>\\n\\n              <p class=\"pl\">[意] 埃莱娜·费兰特 / 陈英 / 人民文学出版社 / 2017-4 / 59.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    87505人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">探索青年时代的激情、困惑、挣扎、背叛和失去</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1054685/\"\\n              onclick=\"moreurl(this,{i:\\'23\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1447349.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1054685/\" onclick=&#34;moreurl(this,{i:&#39;23&#39;})&#34; title=\"沉默的大多数\"\\n                \\n              >\\n                沉默的大多数\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 王小波杂文随笔全编 </span>\\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">王小波 / 中国青年出版社 / 1997-10 / 27.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.1</span>\\n\\n                <span class=\"pl\">(\\n                    148025人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">沉默是沉默者的通行证</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1915958/\"\\n              onclick=\"moreurl(this,{i:\\'24\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s34099301.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1915958/\" onclick=&#34;moreurl(this,{i:&#39;24&#39;})&#34; title=\"野草\"\\n                \\n              >\\n                野草\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">鲁迅 / 人民文学出版社 / 1973-3 / 0.20元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar50\"></span>\\n                  <span class=\"rating_nums\">9.5</span>\\n\\n                <span class=\"pl\">(\\n                    45086人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">我以这一丛野草，在明与暗，生与死，过去与未来之际，献于友与仇，人与兽，爱者与不爱者之前作证。</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n\\n    \\n    \\n    \\n    \\n        <div class=\"paginator\">\\n        <span class=\"prev\">\\n            &lt;前页\\n        </span>\\n        \\n        \\n\\n                <span class=\"thispage\">1</span>\\n                \\n            <a href=\"https://book.douban.com/top250?start=25\" >2</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=50\" >3</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=75\" >4</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=100\" >5</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=125\" >6</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=150\" >7</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=175\" >8</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=200\" >9</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=225\" >10</a>\\n        \\n        <span class=\"next\">\\n            <link rel=\"next\" href=\"https://book.douban.com/top250?start=25\"/>\\n            <a href=\"https://book.douban.com/top250?start=25\" >后页&gt;</a>\\n        </span>\\n\\n        </div>\\n\\n\\n  </div>\\n</div>\\n      <div class=\"aside\">\\n        \\n  <span class=\"indent pl\">\\n    豆瓣用户每天都在对“读过”的书进行“很差”到“力荐”的评价，豆瓣根据每本书读过的人数以及该书所得的评价等综合数据，通过算法分析产生了豆瓣读书 Top 250。\\n  </span>\\n\\n      </div>\\n      <div class=\"extra\">\\n        \\n      </div>\\n    </div>\\n  </div>\\n\\n        \\n  <div id=\"footer\">\\n    \\n<span id=\"icp\" class=\"fleft gray-link\">\\n    &copy; 2005－2023 douban.com, all rights reserved 北京豆网科技有限公司\\n</span>\\n\\n<a href=\"https://www.douban.com/hnypt/variformcyst.py\" style=\"display: none;\"></a>\\n\\n<span class=\"fright\">\\n    <a href=\"https://www.douban.com/about\">关于豆瓣</a>\\n    · <a href=\"https://www.douban.com/jobs\">在豆瓣工作</a>\\n    · <a href=\"https://www.douban.com/about?topic=contactus\">联系我们</a>\\n    · <a href=\"https://www.douban.com/about/legal\">法律声明</a>\\n    \\n    · <a href=\"https://help.douban.com/?app=book\" target=\"_blank\">帮助中心</a>\\n    · <a href=\"https://book.douban.com/library_invitation\">图书馆合作</a>\\n    · <a href=\"https://www.douban.com/doubanapp/\">移动应用</a>\\n    · <a href=\"https://www.douban.com/partner/\">豆瓣广告</a>\\n</span>\\n\\n  </div>\\n\\n    </div>\\n      \\n\\n    <!-- COLLECTED JS -->\\n    <!-- mako -->\\n    \\n    \\n  \\n\\n<script type=\"text/javascript\">\\n  var _paq = _paq || [];\\n  _paq.push([\\'trackPageView\\']);\\n  _paq.push([\\'enableLinkTracking\\']);\\n  (function() {\\n    var p=((\\'https:\\' == document.location.protocol) ? \\'https\\' : \\'http\\'), u=p+\\'://fundin.douban.com/\\';\\n    _paq.push([\\'setTrackerUrl\\', u+\\'piwik\\']);\\n    _paq.push([\\'setSiteId\\', \\'100001\\']);\\n    var d=document, g=d.createElement(\\'script\\'), s=d.getElementsByTagName(\\'script\\')[0]; \\n    g.type=\\'text/javascript\\';\\n    g.defer=true; \\n    g.async=true; \\n    g.src=p+\\'://s.doubanio.com/dae/fundin/piwik.js\\';\\n    s.parentNode.insertBefore(g,s);\\n  })();\\n</script>\\n\\n<script type=\"text/javascript\">\\nvar setMethodWithNs = function(namespace) {\\n  var ns = namespace ? namespace + \\'.\\' : \\'\\'\\n    , fn = function(string) {\\n        if(!ns) {return string}\\n        return ns + string\\n      }\\n  return fn\\n}\\n\\nvar gaWithNamespace = function(fn, namespace) {\\n  var method = setMethodWithNs(namespace)\\n  fn.call(this, method)\\n}\\n\\nvar _gaq = _gaq || []\\n  , accounts = [\\n      { id: \\'UA-7019765-1\\', namespace: \\'douban\\' }\\n    , { id: \\'UA-7019765-16\\', namespace: \\'\\' }\\n    ]\\n  , gaInit = function(account) {\\n      gaWithNamespace(function(method) {\\n        gaInitFn.call(this, method, account)\\n      }, account.namespace)\\n    }\\n  , gaInitFn = function(method, account) {\\n      _gaq.push([method(\\'_setAccount\\'), account.id])\\n\\n      \\n  _gaq.push([method(\\'_addOrganic\\'), \\'google\\', \\'q\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'baidu\\', \\'wd\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'soso\\', \\'w\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'youdao\\', \\'q\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'so.360.cn\\', \\'q\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'sogou\\', \\'query\\'])\\n  if (account.namespace) {\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'豆瓣\\'])\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'douban\\'])\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'豆瓣网\\'])\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'www.douban.com\\'])\\n  }\\n\\n      if (account.namespace === \\'douban\\') {\\n        _gaq.push([method(\\'_setDomainName\\'), \\'.douban.com\\'])\\n      }\\n\\n        _gaq.push([method(\\'_setCustomVar\\'), 1, \\'responsive_view_mode\\', \\'desktop\\', 3])\\n\\n        _gaq.push([method(\\'_setCustomVar\\'), 2, \\'login_status\\', \\'0\\', 2]);\\n\\n      _gaq.push([method(\\'_trackPageview\\')])\\n    }\\n\\nfor(var i = 0, l = accounts.length; i < l; i++) {\\n  var account = accounts[i]\\n  gaInit(account)\\n}\\n\\n\\n;(function() {\\n    var ga = document.createElement(\\'script\\');\\n    ga.src = (\\'https:\\' == document.location.protocol ? \\'https://ssl\\' : \\'http://www\\') + \\'.google-analytics.com/ga.js\\';\\n    ga.setAttribute(\\'async\\', \\'true\\');\\n    document.documentElement.firstChild.appendChild(ga);\\n})()\\n</script>\\n\\n\\n\\n\\n\\n\\n\\n\\n    <!-- dae-web-book--default-5fd448f95d-cxl8h-->\\n\\n</body>\\n</html>\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 查看返回内容，搜索该页面的“红楼梦”是否在返回的文本中，确认与网页一致\n",
    "resp.text"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "05b82372",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:10:37.057391Z",
     "start_time": "2023-08-08T18:10:37.050693Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "str"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 将返回内容放入html中，html为str\n",
    "html = resp.text\n",
    "html\n",
    "type(html)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "333f7535",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:11:31.669795Z",
     "start_time": "2023-08-08T18:11:31.665245Z"
    }
   },
   "outputs": [],
   "source": [
    "# 函数：获得html  get_html(url)\n",
    "# 参数说明：url为单个网址\n",
    "# 返回值：html为网址的html数据，即网页源代码的字符串\n",
    "def get_html(url):         # 添加：定义函数名\n",
    "    headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) \\\n",
    "            AppleWebKit/537.36 (KHTML, like Gecko) \\\n",
    "           Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0'}\n",
    "    resp = requests.get(url,headers=headers)\n",
    "    html = resp.text\n",
    "    return html            # 添加：返回网址的html数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "24dd07fa",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:11:55.212151Z",
     "start_time": "2023-08-08T18:11:51.124348Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'\\n\\n<!DOCTYPE html>\\n<html lang=\"zh-cmn-Hans\" class=\"ua-windows ua-webkit book-new-nav\">\\n<head>\\n  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\\n  <title>豆瓣读书 Top 250</title>\\n  \\n<script>!function(e){var o=function(o,n,t){var c,i,r=new Date;n=n||30,t=t||\"/\",r.setTime(r.getTime()+24*n*60*60*1e3),c=\"; expires=\"+r.toGMTString();for(i in o)e.cookie=i+\"=\"+o[i]+c+\"; path=\"+t},n=function(o){var n,t,c,i=o+\"=\",r=e.cookie.split(\";\");for(t=0,c=r.length;t<c;t++)if(n=r[t].replace(/^\\\\s+|\\\\s+$/g,\"\"),0==n.indexOf(i))return n.substring(i.length,n.length).replace(/\\\\\"/g,\"\");return null},t=e.write,c={\"douban.com\":1,\"douban.fm\":1,\"google.com\":1,\"google.cn\":1,\"googleapis.com\":1,\"gmaptiles.co.kr\":1,\"gstatic.com\":1,\"gstatic.cn\":1,\"google-analytics.com\":1,\"googleadservices.com\":1},i=function(e,o){var n=new Image;n.onload=function(){},n.src=\"https://www.douban.com/j/except_report?kind=ra022&reason=\"+encodeURIComponent(e)+\"&environment=\"+encodeURIComponent(o)},r=function(o){try{t.call(e,o)}catch(e){t(o)}},a=/<script.*?src\\\\=[\"\\']?([^\"\\'\\\\s>]+)/gi,g=/http:\\\\/\\\\/(.+?)\\\\.([^\\\\/]+).+/i;e.writeln=e.write=function(e){var t,l=a.exec(e);return l&&(t=g.exec(l[1]))?c[t[2]]?void r(e):void(\"tqs\"!==n(\"hj\")&&(i(l[1],location.href),o({hj:\"tqs\"},1),setTimeout(function(){location.replace(location.href)},50))):void r(e)}}(document);</script>\\n\\n  \\n  <meta http-equiv=\"Pragma\" content=\"no-cache\">\\n  <meta http-equiv=\"Expires\" content=\"Sun, 6 Mar 2005 01:00:00 GMT\">\\n  \\n  <script>var _head_start = new Date();</script>\\n  \\n  <link href=\"https://img1.doubanio.com/f/vendors/02814fbb5bee25484516bd0a642af695f7ec5a83/css/douban.css\" rel=\"stylesheet\" type=\"text/css\">\\n  <link href=\"https://img2.doubanio.com/cuphead/book-static/common/master.dd2c2.css\" rel=\"stylesheet\" type=\"text/css\">\\n\\n  <link href=\"https://img2.doubanio.com/cuphead/book-static/base/init.e399f.css\" rel=\"stylesheet\">\\n  <style type=\"text/css\"></style>\\n  <script src=\"https://img1.doubanio.com/f/vendors/0511abe9863c2ea7084efa7e24d1d86c5b3974f1/js/jquery-1.10.2.min.js\"></script>\\n  <script src=\"https://img1.doubanio.com/f/vendors/aa9559674f2476cdc16f755b3cdc4ebc478db669/js/douban.js\"></script>\\n  <script src=\"https://img1.doubanio.com/cuphead/book-static/common/master.307d7.js\"></script>\\n  \\n\\n  \\n  <script>  </script>\\n  <!-- COLLECTED CSS -->\\n\\n  <link rel=\"shortcut icon\" href=\"https://img1.doubanio.com/favicon.ico\" type=\"image/x-icon\">\\n</head>\\n<body>\\n  \\n    <script>var _body_start = new Date();</script>\\n    \\n  \\n\\n\\n\\n    <link href=\"//img3.doubanio.com/dae/accounts/resources/164cfd8/shire/bundle.css\" rel=\"stylesheet\" type=\"text/css\">\\n\\n\\n\\n<div id=\"db-global-nav\" class=\"global-nav\">\\n  <div class=\"bd\">\\n    \\n<div class=\"top-nav-info\">\\n  <a href=\"https://accounts.douban.com/passport/login?source=book\" class=\"nav-login\" rel=\"nofollow\">登录/注册</a>\\n</div>\\n\\n\\n    <div class=\"top-nav-doubanapp\">\\n  <a href=\"https://www.douban.com/doubanapp/app?channel=top-nav\" class=\"lnk-doubanapp\">下载豆瓣客户端</a>\\n  <div id=\"doubanapp-tip\">\\n    <a href=\"https://www.douban.com/doubanapp/app?channel=qipao\" class=\"tip-link\">豆瓣 <span class=\"version\">6.0</span> 全新发布</a>\\n    <a href=\"javascript: void 0;\" class=\"tip-close\">×</a>\\n  </div>\\n  <div id=\"top-nav-appintro\" class=\"more-items\">\\n    <p class=\"appintro-title\">豆瓣</p>\\n    <p class=\"qrcode\">扫码直接下载</p>\\n    <div class=\"download\">\\n      <a href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&direct_dl=1&download=iOS\">iPhone</a>\\n      <span>·</span>\\n      <a href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&direct_dl=1&download=Android\" class=\"download-android\">Android</a>\\n    </div>\\n  </div>\\n</div>\\n\\n    \\n\\n\\n<div class=\"global-nav-items\">\\n  <ul>\\n    <li class=\"\">\\n      <a href=\"https://www.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-main&quot;,&quot;uid&quot;:&quot;0&quot;}\">豆瓣</a>\\n    </li>\\n    <li class=\"on\">\\n      <a href=\"https://book.douban.com\"  data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-book&quot;,&quot;uid&quot;:&quot;0&quot;}\">读书</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://movie.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-movie&quot;,&quot;uid&quot;:&quot;0&quot;}\">电影</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://music.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-music&quot;,&quot;uid&quot;:&quot;0&quot;}\">音乐</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://www.douban.com/location\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-location&quot;,&quot;uid&quot;:&quot;0&quot;}\">同城</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://www.douban.com/group\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-group&quot;,&quot;uid&quot;:&quot;0&quot;}\">小组</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://read.douban.com&#47;?dcs=top-nav&amp;dcm=douban\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-read&quot;,&quot;uid&quot;:&quot;0&quot;}\">阅读</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://fm.douban.com&#47;?from_=shire_top_nav\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-fm&quot;,&quot;uid&quot;:&quot;0&quot;}\">FM</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://time.douban.com&#47;?dt_time_source=douban-web_top_nav\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-time&quot;,&quot;uid&quot;:&quot;0&quot;}\">时间</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://market.douban.com&#47;?utm_campaign=douban_top_nav&amp;utm_source=douban&amp;utm_medium=pc_web\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-market&quot;,&quot;uid&quot;:&quot;0&quot;}\">豆品</a>\\n    </li>\\n  </ul>\\n</div>\\n\\n  </div>\\n</div>\\n<script>\\n  ;window._GLOBAL_NAV = {\\n    DOUBAN_URL: \"https://www.douban.com\",\\n    N_NEW_NOTIS: 0,\\n    N_NEW_DOUMAIL: 0\\n  };\\n</script>\\n\\n\\n\\n    <script src=\"//img3.doubanio.com/dae/accounts/resources/164cfd8/shire/bundle.js\" defer=\"defer\"></script>\\n\\n\\n\\n\\n  \\n\\n\\n\\n    <link href=\"//img3.doubanio.com/dae/accounts/resources/164cfd8/book/bundle.css\" rel=\"stylesheet\" type=\"text/css\">\\n\\n\\n\\n\\n<div id=\"db-nav-book\" class=\"nav\">\\n  <div class=\"nav-wrap\">\\n  <div class=\"nav-primary\">\\n    <div class=\"nav-logo\">\\n      <a href=\"https:&#47;&#47;book.douban.com\">豆瓣读书</a>\\n    </div>\\n    <div class=\"nav-search\">\\n      <form action=\"https:&#47;&#47;search.douban.com&#47;book/subject_search\" method=\"get\">\\n        <fieldset>\\n          <legend>搜索：</legend>\\n          <label for=\"inp-query\">\\n          </label>\\n          <div class=\"inp\"><input id=\"inp-query\" name=\"search_text\" size=\"22\" maxlength=\"60\" placeholder=\"书名、作者、ISBN\" value=\"\"></div>\\n          <div class=\"inp-btn\"><input type=\"submit\" value=\"搜索\"></div>\\n          <input type=\"hidden\" name=\"cat\" value=\"1001\" />\\n        </fieldset>\\n      </form>\\n    </div>\\n  </div>\\n  </div>\\n  <div class=\"nav-secondary\">\\n    \\n\\n<div class=\"nav-items\">\\n  <ul>\\n    <li    ><a href=\"https://book.douban.com/cart/\"\\n     >购书单</a>\\n    </li>\\n    <li    ><a href=\"https://read.douban.com/ebooks/?dcs=book-nav&dcm=douban\"\\n            target=\"_blank\"\\n     >电子图书</a>\\n    </li>\\n    <li    ><a href=\"https://market.douban.com/book?utm_campaign=book_nav_freyr&utm_source=douban&utm_medium=pc_web\"\\n     >豆瓣书店</a>\\n    </li>\\n    <li    ><a href=\"https://book.douban.com/annual/2022?fullscreen=1&source=navigation\"\\n            target=\"_blank\"\\n     >2022年度榜单</a>\\n    </li>\\n    <li    ><a href=\"https://standbyme2022.douban.com/?autorotate=false&fullscreen=true&hidenav=true&source=web_navigation\"\\n            target=\"_blank\"\\n     >2022书影音报告</a>\\n    </li>\\n    <li          class=\" book-cart\"\\n    ><a href=\"https://market.douban.com/cart/?biz_type=book&utm_campaign=book_nav_cart&utm_source=douban&utm_medium=pc_web\"\\n            target=\"_blank\"\\n     >购物车</a>\\n    </li>\\n  </ul>\\n</div>\\n\\n    <a href=\"https://book.douban.com/annual/2022?fullscreen=1&source=book_navigation\" class=\"bookannual\"></a>\\n  </div>\\n</div>\\n\\n<script id=\"suggResult\" type=\"text/x-jquery-tmpl\">\\n  <li data-link=\"{{= url}}\">\\n            <a href=\"{{= url}}\" onclick=\"moreurl(this, {from:\\'book_search_sugg\\', query:\\'{{= keyword }}\\', subject_id:\\'{{= id}}\\', i: \\'{{= index}}\\', type: \\'{{= type}}\\'})\">\\n            <img src=\"{{= pic}}\" width=\"40\" />\\n            <div>\\n                <em>{{= title}}</em>\\n                {{if year}}\\n                    <span>{{= year}}</span>\\n                {{/if}}\\n                <p>\\n                {{if type == \"b\"}}\\n                    {{= author_name}}\\n                {{else type == \"a\" }}\\n                    {{if en_name}}\\n                        {{= en_name}}\\n                    {{/if}}\\n                {{/if}}\\n                 </p>\\n            </div>\\n        </a>\\n        </li>\\n  </script>\\n\\n\\n\\n\\n    <script src=\"//img3.doubanio.com/dae/accounts/resources/164cfd8/book/bundle.js\" defer=\"defer\"></script>\\n\\n\\n\\n\\n\\n    <div id=\"wrapper\">\\n        \\n        \\n  <div id=\"content\">\\n    \\n    <h1>豆瓣读书 Top 250</h1>\\n\\n    <div class=\"grid-16-8 clearfix\">\\n      \\n      <div class=\"article\">\\n  <div class=\"indent\">\\n    \\n  \\n\\n        <p class=\"ulfirst\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1007305/\"\\n              onclick=\"moreurl(this,{i:\\'0\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1070959.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1007305/\" onclick=&#34;moreurl(this,{i:&#39;0&#39;})&#34; title=\"红楼梦\"\\n                \\n              >\\n                红楼梦\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">[清] 曹雪芹 著 / 人民文学出版社 / 1996-12 / 59.70元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar50\"></span>\\n                  <span class=\"rating_nums\">9.6</span>\\n\\n                <span class=\"pl\">(\\n                    413885人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">都云作者痴，谁解其中味？</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/4913064/\"\\n              onclick=\"moreurl(this,{i:\\'1\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s29053580.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/4913064/\" onclick=&#34;moreurl(this,{i:&#39;1&#39;})&#34; title=\"活着\"\\n                \\n              >\\n                活着\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">余华 / 作家出版社 / 2012-8-1 / 20.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.4</span>\\n\\n                <span class=\"pl\">(\\n                    806553人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">生的苦难与伟大</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/4820710/\"\\n              onclick=\"moreurl(this,{i:\\'2\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s4371408.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/4820710/\" onclick=&#34;moreurl(this,{i:&#39;2&#39;})&#34; title=\"1984\"\\n                \\n              >\\n                1984\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Nineteen Eighty-Four</span>\\n            </div>\\n\\n              <p class=\"pl\">[英] 乔治·奥威尔 / 刘绍铭 / 北京十月文艺出版社 / 2010-4-1 / 28.00</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.4</span>\\n\\n                <span class=\"pl\">(\\n                    275816人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">栗树荫下，我出卖你，你出卖我</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/6518605/\"\\n              onclick=\"moreurl(this,{i:\\'3\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s30016152.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/6518605/\" onclick=&#34;moreurl(this,{i:&#39;3&#39;})&#34; title=\"三体全集\"\\n                \\n              >\\n                三体全集\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 地球往事三部曲 </span>\\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">刘慈欣 / 重庆出版社 / 2012-1 / 168.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar50\"></span>\\n                  <span class=\"rating_nums\">9.5</span>\\n\\n                <span class=\"pl\">(\\n                    178125人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">地球往事三部曲</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/24531956/\"\\n              onclick=\"moreurl(this,{i:\\'4\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s29101586.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/24531956/\" onclick=&#34;moreurl(this,{i:&#39;4&#39;})&#34; title=\"哈利·波特\"\\n                \\n              >\\n                哈利·波特\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Harry Potter</span>\\n            </div>\\n\\n              <p class=\"pl\">J.K.罗琳 (J.K.Rowling) / 苏农 / 人民文学出版社 / 2008-12-1 / 498.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar50\"></span>\\n                  <span class=\"rating_nums\">9.7</span>\\n\\n                <span class=\"pl\">(\\n                    99452人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">从9¾站台开始的旅程</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/6082808/\"\\n              onclick=\"moreurl(this,{i:\\'5\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s27237850.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/6082808/\" onclick=&#34;moreurl(this,{i:&#39;5&#39;})&#34; title=\"百年孤独\"\\n                \\n              >\\n                百年孤独\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Cien años de soledad</span>\\n            </div>\\n\\n              <p class=\"pl\">[哥伦比亚] 加西亚·马尔克斯 / 范晔 / 南海出版公司 / 2011-6 / 39.50元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    414705人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">魔幻现实主义文学代表作</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1068920/\"\\n              onclick=\"moreurl(this,{i:\\'6\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1078958.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1068920/\" onclick=&#34;moreurl(this,{i:&#39;6&#39;})&#34; title=\"飘\"\\n                \\n              >\\n                飘\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Gone with the Wind</span>\\n            </div>\\n\\n              <p class=\"pl\">[美国] 玛格丽特·米切尔 / 李美华 / 译林出版社 / 2000-9 / 40.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    208442人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">革命时期的爱情，随风而逝</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1019568/\"\\n              onclick=\"moreurl(this,{i:\\'7\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1076932.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1019568/\" onclick=&#34;moreurl(this,{i:&#39;7&#39;})&#34; title=\"三国演义（全二册）\"\\n                \\n              >\\n                三国演义（全二册）\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">[明] 罗贯中 / 人民文学出版社 / 1998-05 / 39.50元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    164243人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">是非成败转头空</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/27614904/\"\\n              onclick=\"moreurl(this,{i:\\'8\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s29651121.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/27614904/\" onclick=&#34;moreurl(this,{i:&#39;8&#39;})&#34; title=\"房思琪的初恋乐园\"\\n                \\n              >\\n                房思琪的初恋乐园\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">林奕含 / 北京联合出版公司 / 2018-2 / 45.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    366763人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">向死而生的文学绝唱</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/2035179/\"\\n              onclick=\"moreurl(this,{i:\\'9\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s2347590.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/2035179/\" onclick=&#34;moreurl(this,{i:&#39;9&#39;})&#34; title=\"动物农场\"\\n                \\n              >\\n                动物农场\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Animal Farm</span>\\n            </div>\\n\\n              <p class=\"pl\">[英] 乔治·奥威尔 / 荣如德 / 上海译文出版社 / 2007-3 / 10.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    154292人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">太阳底下并无新事</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1040211/\"\\n              onclick=\"moreurl(this,{i:\\'10\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1229240.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1040211/\" onclick=&#34;moreurl(this,{i:&#39;10&#39;})&#34; title=\"福尔摩斯探案全集（上中下）\"\\n                \\n              >\\n                福尔摩斯探案全集（上中下）\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">[英] 阿·柯南道尔 / 丁钟华 等 / 群众出版社 / 1981-8 / 53.00元/68.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    130422人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">名侦探的代名词</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/10554308/\"\\n              onclick=\"moreurl(this,{i:\\'11\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s24514468.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/10554308/\" onclick=&#34;moreurl(this,{i:&#39;11&#39;})&#34; title=\"白夜行\"\\n                \\n              >\\n                白夜行\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">[日] 东野圭吾 / 刘姿君 / 南海出版公司 / 2013-1-1 / 39.50元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    458442人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">一宗离奇命案牵出跨度近20年步步惊心的故事</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1084336/\"\\n              onclick=\"moreurl(this,{i:\\'12\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1103152.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1084336/\" onclick=&#34;moreurl(this,{i:&#39;12&#39;})&#34; title=\"小王子\"\\n                \\n              >\\n                小王子\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Le Petit Prince</span>\\n            </div>\\n\\n              <p class=\"pl\">[法] 圣埃克苏佩里 / 马振聘 / 人民文学出版社 / 2003-8 / 22.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.1</span>\\n\\n                <span class=\"pl\">(\\n                    743060人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">献给长成了大人的孩子们</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1060068/\"\\n              onclick=\"moreurl(this,{i:\\'13\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1369343.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1060068/\" onclick=&#34;moreurl(this,{i:&#39;13&#39;})&#34; title=\"撒哈拉的故事\"\\n                \\n              >\\n                撒哈拉的故事\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">三毛 / 哈尔滨出版社 / 2003-8 / 15.80元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    167778人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">游荡的自由灵魂</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1046209/\"\\n              onclick=\"moreurl(this,{i:\\'14\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1034062.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1046209/\" onclick=&#34;moreurl(this,{i:&#39;14&#39;})&#34; title=\"安徒生童话故事集\"\\n                \\n              >\\n                安徒生童话故事集\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">（丹麦）安徒生 / 叶君健 / 人民文学出版社 / 1997-08 / 25.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    129086人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">为了争取未来的一代</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1255625/\"\\n              onclick=\"moreurl(this,{i:\\'15\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s26018275.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1255625/\" onclick=&#34;moreurl(this,{i:&#39;15&#39;})&#34; title=\"天龙八部\"\\n                \\n              >\\n                天龙八部\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">金庸 / 生活·读书·新知三联书店 / 1994-5 / 96.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    130360人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">有情皆孽，无人不冤</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1449351/\"\\n              onclick=\"moreurl(this,{i:\\'16\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s34099286.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1449351/\" onclick=&#34;moreurl(this,{i:&#39;16&#39;})&#34; title=\"呐喊\"\\n                \\n              >\\n                呐喊\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">鲁迅 / 人民文学出版社 / 1973-3 / 0.36元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    155488人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">新文学的第一声呐喊</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/26980487/\"\\n              onclick=\"moreurl(this,{i:\\'17\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s29396368.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/26980487/\" onclick=&#34;moreurl(this,{i:&#39;17&#39;})&#34; title=\"悉达多\"\\n                \\n              >\\n                悉达多\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 一首印度的诗 </span>\\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Siddhartha</span>\\n            </div>\\n\\n              <p class=\"pl\">[德] 赫尔曼·黑塞 / 姜乙 / 天津人民出版社 / 2017-1 / 32.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    87157人评价\\n                )</span>\\n              </div>\\n\\n            \\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/6781808/\"\\n              onclick=\"moreurl(this,{i:\\'18\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s23128183.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/6781808/\" onclick=&#34;moreurl(this,{i:&#39;18&#39;})&#34; title=\"杀死一只知更鸟\"\\n                \\n              >\\n                杀死一只知更鸟\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">To Kill a Mocking Bird</span>\\n            </div>\\n\\n              <p class=\"pl\">[美] 哈珀·李 / 高红梅 / 译林出版社 / 2012-9 / 32.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    141852人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">有一种东西不能遵循从众原则，那就是——人的良心</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/20424526/\"\\n              onclick=\"moreurl(this,{i:\\'19\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s24516687.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/20424526/\" onclick=&#34;moreurl(this,{i:&#39;19&#39;})&#34; title=\"邓小平时代\"\\n                \\n              >\\n                邓小平时代\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Deng Xiaoping and the Transformation of China</span>\\n            </div>\\n\\n              <p class=\"pl\">【美】傅高义 (Ezra.F.Vogel) / 冯克利 / 生活·读书·新知三联书店 / 2013-1-18 / 88.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    65888人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">个人命运背后的历史变局</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/3674537/\"\\n              onclick=\"moreurl(this,{i:\\'20\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s3745215.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/3674537/\" onclick=&#34;moreurl(this,{i:&#39;20&#39;})&#34; title=\"明朝那些事儿（1-9）\"\\n                \\n              >\\n                明朝那些事儿（1-9）\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 限量版 </span>\\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">当年明月 / 中国海关出版社 / 2009-4 / 358.20元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    166335人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">不拘一格的历史书写</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/30172069/\"\\n              onclick=\"moreurl(this,{i:\\'21\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s29799269.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/30172069/\" onclick=&#34;moreurl(this,{i:&#39;21&#39;})&#34; title=\"失踪的孩子\"\\n                \\n              >\\n                失踪的孩子\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 那不勒斯四部曲4 </span>\\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Storia della bambina perduta</span>\\n            </div>\\n\\n              <p class=\"pl\">[意] 埃莱娜·费兰特 / 陈英 / 人民文学出版社 / 2018-7 / 62.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    76815人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">我的整个生命，只是一场为了提升社会地位的低俗斗争。</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/26986954/\"\\n              onclick=\"moreurl(this,{i:\\'22\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s29376146.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/26986954/\" onclick=&#34;moreurl(this,{i:&#39;22&#39;})&#34; title=\"新名字的故事\"\\n                \\n              >\\n                新名字的故事\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 那不勒斯四部曲2 </span>\\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Storia del nuovo cognome</span>\\n            </div>\\n\\n              <p class=\"pl\">[意] 埃莱娜·费兰特 / 陈英 / 人民文学出版社 / 2017-4 / 59.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    87339人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">探索青年时代的激情、困惑、挣扎、背叛和失去</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1054685/\"\\n              onclick=\"moreurl(this,{i:\\'23\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1447349.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1054685/\" onclick=&#34;moreurl(this,{i:&#39;23&#39;})&#34; title=\"沉默的大多数\"\\n                \\n              >\\n                沉默的大多数\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 王小波杂文随笔全编 </span>\\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">王小波 / 中国青年出版社 / 1997-10 / 27.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.1</span>\\n\\n                <span class=\"pl\">(\\n                    147837人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">沉默是沉默者的通行证</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1915958/\"\\n              onclick=\"moreurl(this,{i:\\'24\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s34099301.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1915958/\" onclick=&#34;moreurl(this,{i:&#39;24&#39;})&#34; title=\"野草\"\\n                \\n              >\\n                野草\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">鲁迅 / 人民文学出版社 / 1973-3 / 0.20元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar50\"></span>\\n                  <span class=\"rating_nums\">9.5</span>\\n\\n                <span class=\"pl\">(\\n                    44971人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">我以这一丛野草，在明与暗，生与死，过去与未来之际，献于友与仇，人与兽，爱者与不爱者之前作证。</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n\\n    \\n    \\n    \\n    \\n        <div class=\"paginator\">\\n        <span class=\"prev\">\\n            &lt;前页\\n        </span>\\n        \\n        \\n\\n                <span class=\"thispage\">1</span>\\n                \\n            <a href=\"https://book.douban.com/top250?start=25\" >2</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=50\" >3</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=75\" >4</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=100\" >5</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=125\" >6</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=150\" >7</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=175\" >8</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=200\" >9</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=225\" >10</a>\\n        \\n        <span class=\"next\">\\n            <link rel=\"next\" href=\"https://book.douban.com/top250?start=25\"/>\\n            <a href=\"https://book.douban.com/top250?start=25\" >后页&gt;</a>\\n        </span>\\n\\n        </div>\\n\\n\\n  </div>\\n</div>\\n      <div class=\"aside\">\\n        \\n  <span class=\"indent pl\">\\n    豆瓣用户每天都在对“读过”的书进行“很差”到“力荐”的评价，豆瓣根据每本书读过的人数以及该书所得的评价等综合数据，通过算法分析产生了豆瓣读书 Top 250。\\n  </span>\\n\\n      </div>\\n      <div class=\"extra\">\\n        \\n      </div>\\n    </div>\\n  </div>\\n\\n        \\n  <div id=\"footer\">\\n    \\n<span id=\"icp\" class=\"fleft gray-link\">\\n    &copy; 2005－2023 douban.com, all rights reserved 北京豆网科技有限公司\\n</span>\\n\\n<a href=\"https://www.douban.com/hnypt/variformcyst.py\" style=\"display: none;\"></a>\\n\\n<span class=\"fright\">\\n    <a href=\"https://www.douban.com/about\">关于豆瓣</a>\\n    · <a href=\"https://www.douban.com/jobs\">在豆瓣工作</a>\\n    · <a href=\"https://www.douban.com/about?topic=contactus\">联系我们</a>\\n    · <a href=\"https://www.douban.com/about/legal\">法律声明</a>\\n    \\n    · <a href=\"https://help.douban.com/?app=book\" target=\"_blank\">帮助中心</a>\\n    · <a href=\"https://book.douban.com/library_invitation\">图书馆合作</a>\\n    · <a href=\"https://www.douban.com/doubanapp/\">移动应用</a>\\n    · <a href=\"https://www.douban.com/partner/\">豆瓣广告</a>\\n</span>\\n\\n  </div>\\n\\n    </div>\\n      \\n\\n    <!-- COLLECTED JS -->\\n    <!-- mako -->\\n    \\n    \\n  \\n\\n<script type=\"text/javascript\">\\n  var _paq = _paq || [];\\n  _paq.push([\\'trackPageView\\']);\\n  _paq.push([\\'enableLinkTracking\\']);\\n  (function() {\\n    var p=((\\'https:\\' == document.location.protocol) ? \\'https\\' : \\'http\\'), u=p+\\'://fundin.douban.com/\\';\\n    _paq.push([\\'setTrackerUrl\\', u+\\'piwik\\']);\\n    _paq.push([\\'setSiteId\\', \\'100001\\']);\\n    var d=document, g=d.createElement(\\'script\\'), s=d.getElementsByTagName(\\'script\\')[0]; \\n    g.type=\\'text/javascript\\';\\n    g.defer=true; \\n    g.async=true; \\n    g.src=p+\\'://s.doubanio.com/dae/fundin/piwik.js\\';\\n    s.parentNode.insertBefore(g,s);\\n  })();\\n</script>\\n\\n<script type=\"text/javascript\">\\nvar setMethodWithNs = function(namespace) {\\n  var ns = namespace ? namespace + \\'.\\' : \\'\\'\\n    , fn = function(string) {\\n        if(!ns) {return string}\\n        return ns + string\\n      }\\n  return fn\\n}\\n\\nvar gaWithNamespace = function(fn, namespace) {\\n  var method = setMethodWithNs(namespace)\\n  fn.call(this, method)\\n}\\n\\nvar _gaq = _gaq || []\\n  , accounts = [\\n      { id: \\'UA-7019765-1\\', namespace: \\'douban\\' }\\n    , { id: \\'UA-7019765-16\\', namespace: \\'\\' }\\n    ]\\n  , gaInit = function(account) {\\n      gaWithNamespace(function(method) {\\n        gaInitFn.call(this, method, account)\\n      }, account.namespace)\\n    }\\n  , gaInitFn = function(method, account) {\\n      _gaq.push([method(\\'_setAccount\\'), account.id])\\n\\n      \\n  _gaq.push([method(\\'_addOrganic\\'), \\'google\\', \\'q\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'baidu\\', \\'wd\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'soso\\', \\'w\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'youdao\\', \\'q\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'so.360.cn\\', \\'q\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'sogou\\', \\'query\\'])\\n  if (account.namespace) {\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'豆瓣\\'])\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'douban\\'])\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'豆瓣网\\'])\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'www.douban.com\\'])\\n  }\\n\\n      if (account.namespace === \\'douban\\') {\\n        _gaq.push([method(\\'_setDomainName\\'), \\'.douban.com\\'])\\n      }\\n\\n        _gaq.push([method(\\'_setCustomVar\\'), 1, \\'responsive_view_mode\\', \\'desktop\\', 3])\\n\\n        _gaq.push([method(\\'_setCustomVar\\'), 2, \\'login_status\\', \\'0\\', 2]);\\n\\n      _gaq.push([method(\\'_trackPageview\\')])\\n    }\\n\\nfor(var i = 0, l = accounts.length; i < l; i++) {\\n  var account = accounts[i]\\n  gaInit(account)\\n}\\n\\n\\n;(function() {\\n    var ga = document.createElement(\\'script\\');\\n    ga.src = (\\'https:\\' == document.location.protocol ? \\'https://ssl\\' : \\'http://www\\') + \\'.google-analytics.com/ga.js\\';\\n    ga.setAttribute(\\'async\\', \\'true\\');\\n    document.documentElement.firstChild.appendChild(ga);\\n})()\\n</script>\\n\\n\\n\\n\\n\\n\\n\\n\\n    <!-- dae-web-book--default-5777c958f4-wplmn-->\\n\\n</body>\\n</html>\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n'"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 调用函数get_html(url)\n",
    "url_tmp = 'https://book.douban.com/top250?start=0'  # 第1页\n",
    "html_tmp = get_html(url_tmp)\n",
    "html_tmp"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c7413d23",
   "metadata": {},
   "source": [
    "# 解析数据"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "31d6ec1c",
   "metadata": {},
   "source": [
    "- 上面获得的html数据是杂乱的，需要把它**整理成结构化的数据**，即解析数据\n",
    "- 方式：用开发者工具中的elements，分析字段的分布情况，找出具有**定位唯一性的标签**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "6d822ec9",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:13:11.821501Z",
     "start_time": "2023-08-08T18:13:11.800028Z"
    }
   },
   "outputs": [],
   "source": [
    "from pyquery import PyQuery  #导入pyquery包\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "doc = PyQuery(html) # 将html字符串转换为pyquery数据，便于解析\n",
    "type(doc)   # 数据类型为pyquery.pyquery.PyQuery\n",
    "doc.text()    # 数据变“干净”了"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "id": "4bea106a",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T16:52:32.823420Z",
     "start_time": "2023-08-08T16:52:32.810921Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<generator object PyQuery.items at 0x0000029169C37370>"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 只要书籍信息：调用items获得生成器\n",
    "doc.items('tr.item')    # 书的定位标签为tr.item"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "id": "1033891a",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:29:47.458535Z",
     "start_time": "2023-08-08T18:29:47.447499Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/1007305/\" onclick=\"moreurl(this,{i:'0'})\">\n",
      "              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1070959.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/1007305/\" onclick=\"&quot;moreurl(this,{i:'0'})&quot;\" title=\"红楼梦\">\n",
      "                红楼梦\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">[清] 曹雪芹 著 / 人民文学出版社 / 1996-12 / 59.70元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar50\"/>\n",
      "                  <span class=\"rating_nums\">9.6</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    413885人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">都云作者痴，谁解其中味？</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/4913064/\" onclick=\"moreurl(this,{i:'1'})\">\n",
      "              <img src=\"https://img1.doubanio.com/view/subject/s/public/s29053580.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/4913064/\" onclick=\"&quot;moreurl(this,{i:'1'})&quot;\" title=\"活着\">\n",
      "                活着\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">余华 / 作家出版社 / 2012-8-1 / 20.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.4</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    806553人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">生的苦难与伟大</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/4820710/\" onclick=\"moreurl(this,{i:'2'})\">\n",
      "              <img src=\"https://img1.doubanio.com/view/subject/s/public/s4371408.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/4820710/\" onclick=\"&quot;moreurl(this,{i:'2'})&quot;\" title=\"1984\">\n",
      "                1984\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "                <br/>\n",
      "                <span style=\"font-size:12px;\">Nineteen Eighty-Four</span>\n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">[英] 乔治·奥威尔 / 刘绍铭 / 北京十月文艺出版社 / 2010-4-1 / 28.00</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.4</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    275816人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">栗树荫下，我出卖你，你出卖我</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/6518605/\" onclick=\"moreurl(this,{i:'3'})\">\n",
      "              <img src=\"https://img2.doubanio.com/view/subject/s/public/s30016152.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/6518605/\" onclick=\"&quot;moreurl(this,{i:'3'})&quot;\" title=\"三体全集\">\n",
      "                三体全集\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 地球往事三部曲 </span>\n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">刘慈欣 / 重庆出版社 / 2012-1 / 168.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar50\"/>\n",
      "                  <span class=\"rating_nums\">9.5</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    178125人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">地球往事三部曲</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/24531956/\" onclick=\"moreurl(this,{i:'4'})\">\n",
      "              <img src=\"https://img9.doubanio.com/view/subject/s/public/s29101586.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/24531956/\" onclick=\"&quot;moreurl(this,{i:'4'})&quot;\" title=\"哈利·波特\">\n",
      "                哈利·波特\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "                <br/>\n",
      "                <span style=\"font-size:12px;\">Harry Potter</span>\n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">J.K.罗琳 (J.K.Rowling) / 苏农 / 人民文学出版社 / 2008-12-1 / 498.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar50\"/>\n",
      "                  <span class=\"rating_nums\">9.7</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    99452人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">从9¾站台开始的旅程</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/6082808/\" onclick=\"moreurl(this,{i:'5'})\">\n",
      "              <img src=\"https://img1.doubanio.com/view/subject/s/public/s27237850.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/6082808/\" onclick=\"&quot;moreurl(this,{i:'5'})&quot;\" title=\"百年孤独\">\n",
      "                百年孤独\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "                <br/>\n",
      "                <span style=\"font-size:12px;\">Cien años de soledad</span>\n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">[哥伦比亚] 加西亚·马尔克斯 / 范晔 / 南海出版公司 / 2011-6 / 39.50元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.3</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    414705人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">魔幻现实主义文学代表作</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/1068920/\" onclick=\"moreurl(this,{i:'6'})\">\n",
      "              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1078958.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/1068920/\" onclick=\"&quot;moreurl(this,{i:'6'})&quot;\" title=\"飘\">\n",
      "                飘\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "                <br/>\n",
      "                <span style=\"font-size:12px;\">Gone with the Wind</span>\n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">[美国] 玛格丽特·米切尔 / 李美华 / 译林出版社 / 2000-9 / 40.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.3</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    208442人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">革命时期的爱情，随风而逝</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/1019568/\" onclick=\"moreurl(this,{i:'7'})\">\n",
      "              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1076932.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/1019568/\" onclick=\"&quot;moreurl(this,{i:'7'})&quot;\" title=\"三国演义（全二册）\">\n",
      "                三国演义（全二册）\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">[明] 罗贯中 / 人民文学出版社 / 1998-05 / 39.50元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.3</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    164243人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">是非成败转头空</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/27614904/\" onclick=\"moreurl(this,{i:'8'})\">\n",
      "              <img src=\"https://img2.doubanio.com/view/subject/s/public/s29651121.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/27614904/\" onclick=\"&quot;moreurl(this,{i:'8'})&quot;\" title=\"房思琪的初恋乐园\">\n",
      "                房思琪的初恋乐园\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">林奕含 / 北京联合出版公司 / 2018-2 / 45.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.2</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    366763人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">向死而生的文学绝唱</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/2035179/\" onclick=\"moreurl(this,{i:'9'})\">\n",
      "              <img src=\"https://img1.doubanio.com/view/subject/s/public/s2347590.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/2035179/\" onclick=\"&quot;moreurl(this,{i:'9'})&quot;\" title=\"动物农场\">\n",
      "                动物农场\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "                <br/>\n",
      "                <span style=\"font-size:12px;\">Animal Farm</span>\n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">[英] 乔治·奥威尔 / 荣如德 / 上海译文出版社 / 2007-3 / 10.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.3</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    154292人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">太阳底下并无新事</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/1040211/\" onclick=\"moreurl(this,{i:'10'})\">\n",
      "              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1229240.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/1040211/\" onclick=\"&quot;moreurl(this,{i:'10'})&quot;\" title=\"福尔摩斯探案全集（上中下）\">\n",
      "                福尔摩斯探案全集（上中下）\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">[英] 阿·柯南道尔 / 丁钟华 等 / 群众出版社 / 1981-8 / 53.00元/68.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.3</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    130422人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">名侦探的代名词</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/10554308/\" onclick=\"moreurl(this,{i:'11'})\">\n",
      "              <img src=\"https://img1.doubanio.com/view/subject/s/public/s24514468.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/10554308/\" onclick=\"&quot;moreurl(this,{i:'11'})&quot;\" title=\"白夜行\">\n",
      "                白夜行\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">[日] 东野圭吾 / 刘姿君 / 南海出版公司 / 2013-1-1 / 39.50元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.2</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    458442人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">一宗离奇命案牵出跨度近20年步步惊心的故事</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/1084336/\" onclick=\"moreurl(this,{i:'12'})\">\n",
      "              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1103152.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/1084336/\" onclick=\"&quot;moreurl(this,{i:'12'})&quot;\" title=\"小王子\">\n",
      "                小王子\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "                <br/>\n",
      "                <span style=\"font-size:12px;\">Le Petit Prince</span>\n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">[法] 圣埃克苏佩里 / 马振聘 / 人民文学出版社 / 2003-8 / 22.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.1</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    743060人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">献给长成了大人的孩子们</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/1060068/\" onclick=\"moreurl(this,{i:'13'})\">\n",
      "              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1369343.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/1060068/\" onclick=\"&quot;moreurl(this,{i:'13'})&quot;\" title=\"撒哈拉的故事\">\n",
      "                撒哈拉的故事\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">三毛 / 哈尔滨出版社 / 2003-8 / 15.80元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.2</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    167778人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">游荡的自由灵魂</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/1046209/\" onclick=\"moreurl(this,{i:'14'})\">\n",
      "              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1034062.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/1046209/\" onclick=\"&quot;moreurl(this,{i:'14'})&quot;\" title=\"安徒生童话故事集\">\n",
      "                安徒生童话故事集\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">（丹麦）安徒生 / 叶君健 / 人民文学出版社 / 1997-08 / 25.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.3</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    129086人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">为了争取未来的一代</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/1255625/\" onclick=\"moreurl(this,{i:'15'})\">\n",
      "              <img src=\"https://img9.doubanio.com/view/subject/s/public/s26018275.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/1255625/\" onclick=\"&quot;moreurl(this,{i:'15'})&quot;\" title=\"天龙八部\">\n",
      "                天龙八部\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">金庸 / 生活·读书·新知三联书店 / 1994-5 / 96.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.2</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    130360人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">有情皆孽，无人不冤</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/1449351/\" onclick=\"moreurl(this,{i:'16'})\">\n",
      "              <img src=\"https://img9.doubanio.com/view/subject/s/public/s34099286.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/1449351/\" onclick=\"&quot;moreurl(this,{i:'16'})&quot;\" title=\"呐喊\">\n",
      "                呐喊\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">鲁迅 / 人民文学出版社 / 1973-3 / 0.36元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.2</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    155488人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">新文学的第一声呐喊</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/26980487/\" onclick=\"moreurl(this,{i:'17'})\">\n",
      "              <img src=\"https://img1.doubanio.com/view/subject/s/public/s29396368.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/26980487/\" onclick=\"&quot;moreurl(this,{i:'17'})&quot;\" title=\"悉达多\">\n",
      "                悉达多\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 一首印度的诗 </span>\n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\n",
      "\n",
      "              \n",
      "                <br/>\n",
      "                <span style=\"font-size:12px;\">Siddhartha</span>\n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">[德] 赫尔曼·黑塞 / 姜乙 / 天津人民出版社 / 2017-1 / 32.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.3</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    87157人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/6781808/\" onclick=\"moreurl(this,{i:'18'})\">\n",
      "              <img src=\"https://img2.doubanio.com/view/subject/s/public/s23128183.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/6781808/\" onclick=\"&quot;moreurl(this,{i:'18'})&quot;\" title=\"杀死一只知更鸟\">\n",
      "                杀死一只知更鸟\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\n",
      "\n",
      "              \n",
      "                <br/>\n",
      "                <span style=\"font-size:12px;\">To Kill a Mocking Bird</span>\n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">[美] 哈珀·李 / 高红梅 / 译林出版社 / 2012-9 / 32.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.2</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    141852人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">有一种东西不能遵循从众原则，那就是——人的良心</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/20424526/\" onclick=\"moreurl(this,{i:'19'})\">\n",
      "              <img src=\"https://img1.doubanio.com/view/subject/s/public/s24516687.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/20424526/\" onclick=\"&quot;moreurl(this,{i:'19'})&quot;\" title=\"邓小平时代\">\n",
      "                邓小平时代\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "                <br/>\n",
      "                <span style=\"font-size:12px;\">Deng Xiaoping and the Transformation of China</span>\n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">【美】傅高义 (Ezra.F.Vogel) / 冯克利 / 生活·读书·新知三联书店 / 2013-1-18 / 88.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.3</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    65888人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">个人命运背后的历史变局</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/3674537/\" onclick=\"moreurl(this,{i:'20'})\">\n",
      "              <img src=\"https://img9.doubanio.com/view/subject/s/public/s3745215.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/3674537/\" onclick=\"&quot;moreurl(this,{i:'20'})&quot;\" title=\"明朝那些事儿（1-9）\">\n",
      "                明朝那些事儿（1-9）\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 限量版 </span>\n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">当年明月 / 中国海关出版社 / 2009-4 / 358.20元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.2</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    166335人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">不拘一格的历史书写</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/30172069/\" onclick=\"moreurl(this,{i:'21'})\">\n",
      "              <img src=\"https://img1.doubanio.com/view/subject/s/public/s29799269.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/30172069/\" onclick=\"&quot;moreurl(this,{i:'21'})&quot;\" title=\"失踪的孩子\">\n",
      "                失踪的孩子\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 那不勒斯四部曲4 </span>\n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\n",
      "\n",
      "              \n",
      "                <br/>\n",
      "                <span style=\"font-size:12px;\">Storia della bambina perduta</span>\n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">[意] 埃莱娜·费兰特 / 陈英 / 人民文学出版社 / 2018-7 / 62.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.2</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    76815人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">我的整个生命，只是一场为了提升社会地位的低俗斗争。</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/26986954/\" onclick=\"moreurl(this,{i:'22'})\">\n",
      "              <img src=\"https://img9.doubanio.com/view/subject/s/public/s29376146.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/26986954/\" onclick=\"&quot;moreurl(this,{i:'22'})&quot;\" title=\"新名字的故事\">\n",
      "                新名字的故事\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 那不勒斯四部曲2 </span>\n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\n",
      "\n",
      "              \n",
      "                <br/>\n",
      "                <span style=\"font-size:12px;\">Storia del nuovo cognome</span>\n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">[意] 埃莱娜·费兰特 / 陈英 / 人民文学出版社 / 2017-4 / 59.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.2</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    87339人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">探索青年时代的激情、困惑、挣扎、背叛和失去</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/1054685/\" onclick=\"moreurl(this,{i:'23'})\">\n",
      "              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1447349.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/1054685/\" onclick=\"&quot;moreurl(this,{i:'23'})&quot;\" title=\"沉默的大多数\">\n",
      "                沉默的大多数\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 王小波杂文随笔全编 </span>\n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">王小波 / 中国青年出版社 / 1997-10 / 27.00元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar45\"/>\n",
      "                  <span class=\"rating_nums\">9.1</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    147837人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">沉默是沉默者的通行证</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n",
      "<tr class=\"item\">\n",
      "          <td width=\"100\" valign=\"top\">\n",
      "            <a class=\"nbg\" href=\"https://book.douban.com/subject/1915958/\" onclick=\"moreurl(this,{i:'24'})\">\n",
      "              <img src=\"https://img2.doubanio.com/view/subject/s/public/s34099301.jpg\" width=\"90\"/>\n",
      "            </a>\n",
      "          </td>\n",
      "          <td valign=\"top\">\n",
      "            \n",
      "            <div class=\"pl2\">\n",
      "\n",
      "\n",
      "              <a href=\"https://book.douban.com/subject/1915958/\" onclick=\"&quot;moreurl(this,{i:'24'})&quot;\" title=\"野草\">\n",
      "                野草\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "              \n",
      "            </div>\n",
      "\n",
      "              <p class=\"pl\">鲁迅 / 人民文学出版社 / 1973-3 / 0.20元</p>\n",
      "\n",
      "            \n",
      "\n",
      "              \n",
      "              <div class=\"star clearfix\">\n",
      "                  <span class=\"allstar50\"/>\n",
      "                  <span class=\"rating_nums\">9.5</span>\n",
      "\n",
      "                <span class=\"pl\">(\n",
      "                    44971人评价\n",
      "                )</span>\n",
      "              </div>\n",
      "\n",
      "            \n",
      "              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "                  <span class=\"inq\">我以这一丛野草，在明与暗，生与死，过去与未来之际，献于友与仇，人与兽，爱者与不爱者之前作证。</span>\n",
      "              </p>\n",
      "\n",
      "\n",
      "          </td>\n",
      "        </tr>\n",
      "      \n"
     ]
    }
   ],
   "source": [
    "for book in doc.items('tr.item'):\n",
    "#     print(type(book))   # 有25本\n",
    "    print(book)       # 查看这25本书的信息"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "545e800a",
   "metadata": {},
   "source": [
    "```三种解析情况```：\n",
    "1. <u>```根据定位标签，直接解析获得```</u>，例如用book('.pl2 a').text()获得“红楼梦”\n",
    "2. 用第一种方法获得数据，再进行<u>```list元素提取```</u>，例如获得['[清] 曹雪芹 著', ' 人民文学出版社 ', ' 1996-12 ', ' 68.00元']，分别提取作者、出版社、出版时间、价格等4个字段\n",
    "3. 用第一种方法获得数据，再用<u>```正则表达式提取```</u>，例如获得“(158378人评价)”，提取“158378（数字）”作为“评价人数（字段）”"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ff80460d",
   "metadata": {},
   "source": [
    "<center><font size=4><b>情况1：直接解析</b></font></center>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "id": "54932ce7",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:33:50.764447Z",
     "start_time": "2023-08-08T18:33:50.751933Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "红楼梦\n",
      "活着\n",
      "1984\n",
      "三体全集 : 地球往事三部曲\n",
      "哈利·波特\n",
      "百年孤独\n",
      "飘\n",
      "三国演义（全二册）\n",
      "房思琪的初恋乐园\n",
      "动物农场\n",
      "福尔摩斯探案全集（上中下）\n",
      "白夜行\n",
      "小王子\n",
      "撒哈拉的故事\n",
      "安徒生童话故事集\n",
      "天龙八部\n",
      "呐喊\n",
      "悉达多 : 一首印度的诗\n",
      "杀死一只知更鸟\n",
      "邓小平时代\n",
      "明朝那些事儿（1-9） : 限量版\n",
      "失踪的孩子 : 那不勒斯四部曲4\n",
      "新名字的故事 : 那不勒斯四部曲2\n",
      "沉默的大多数 : 王小波杂文随笔全编\n",
      "野草\n"
     ]
    }
   ],
   "source": [
    "for book in doc.items('tr.item'):\n",
    "#     print(book('.info h2 a'))\n",
    "#     print(book('.pl2 a').attr('title'))   #取书名的两种方式：一是通过attr方法\n",
    "#     print(book('.pl2 a').text())          # 二是通过text方法，相对完整\n",
    "    book_name = book('.pl2 a').text()     # 放入book_name字段中\n",
    "    print(book_name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "id": "7291f830",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:34:31.072788Z",
     "start_time": "2023-08-08T18:34:31.060316Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "红楼梦\n",
      "活着\n",
      "1984\n",
      "三体全集 : 地球往事三部曲\n",
      "哈利·波特\n",
      "百年孤独\n",
      "飘\n",
      "三国演义（全二册）\n",
      "房思琪的初恋乐园\n",
      "动物农场\n",
      "福尔摩斯探案全集（上中下）\n",
      "白夜行\n",
      "小王子\n",
      "撒哈拉的故事\n",
      "安徒生童话故事集\n",
      "天龙八部\n",
      "呐喊\n",
      "悉达多 : 一首印度的诗\n",
      "杀死一只知更鸟\n",
      "邓小平时代\n",
      "明朝那些事儿（1-9） : 限量版\n",
      "失踪的孩子 : 那不勒斯四部曲4\n",
      "新名字的故事 : 那不勒斯四部曲2\n",
      "沉默的大多数 : 王小波杂文随笔全编\n",
      "野草\n"
     ]
    }
   ],
   "source": [
    "for book in doc.items('tr.item'):\n",
    "    print(book('.pl2 a').text())          "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "id": "873b0374",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T16:52:36.855562Z",
     "start_time": "2023-08-08T16:52:36.814852Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "红楼梦 都云作者痴，谁解其中味？ 9.6\n",
      "活着 生的苦难与伟大 9.4\n",
      "1984 栗树荫下，我出卖你，你出卖我 9.4\n",
      "三体全集 : 地球往事三部曲 地球往事三部曲 9.5\n",
      "哈利·波特 从9¾站台开始的旅程 9.7\n",
      "百年孤独 魔幻现实主义文学代表作 9.3\n",
      "飘 革命时期的爱情，随风而逝 9.3\n",
      "三国演义（全二册） 是非成败转头空 9.3\n",
      "房思琪的初恋乐园 向死而生的文学绝唱 9.2\n",
      "动物农场 太阳底下并无新事 9.3\n",
      "福尔摩斯探案全集（上中下） 名侦探的代名词 9.3\n",
      "白夜行 一宗离奇命案牵出跨度近20年步步惊心的故事 9.2\n",
      "小王子 献给长成了大人的孩子们 9.1\n",
      "撒哈拉的故事 游荡的自由灵魂 9.2\n",
      "安徒生童话故事集 为了争取未来的一代 9.3\n",
      "天龙八部 有情皆孽，无人不冤 9.2\n",
      "呐喊 新文学的第一声呐喊 9.2\n",
      "悉达多 : 一首印度的诗  9.3\n",
      "杀死一只知更鸟 有一种东西不能遵循从众原则，那就是——人的良心 9.2\n",
      "邓小平时代 个人命运背后的历史变局 9.3\n",
      "明朝那些事儿（1-9） : 限量版 不拘一格的历史书写 9.2\n",
      "失踪的孩子 : 那不勒斯四部曲4 我的整个生命，只是一场为了提升社会地位的低俗斗争。 9.2\n",
      "新名字的故事 : 那不勒斯四部曲2 探索青年时代的激情、困惑、挣扎、背叛和失去 9.2\n",
      "沉默的大多数 : 王小波杂文随笔全编 沉默是沉默者的通行证 9.1\n",
      "野草 我以这一丛野草，在明与暗，生与死，过去与未来之际，献于友与仇，人与兽，爱者与不爱者之前作证。 9.5\n"
     ]
    }
   ],
   "source": [
    "# 用类似方法的字段有：book_name, desc, score\n",
    "for book in doc.items('tr.item'):\n",
    "    book_name = book('.pl2 a').text()\n",
    "    desc = book('span.inq').text()\n",
    "    score = book('span.rating_nums').text()\n",
    "    print(book_name, desc, score)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "201f539b",
   "metadata": {},
   "source": [
    "<center><font size=4><b>情况2：提取列表元素</b></font></center>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "id": "1735ec49",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T18:37:14.683081Z",
     "start_time": "2023-08-08T18:37:14.667960Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[清] 曹雪芹 著  人民文学出版社  1996-12   59.70元\n",
      "余华  作家出版社  2012-8-1   20.00元\n",
      "[英] 乔治·奥威尔 , 刘绍铭  北京十月文艺出版社  2010-4-1   28.00\n",
      "刘慈欣  重庆出版社  2012-1   168.00元\n",
      "J.K.罗琳 (J.K.Rowling) , 苏农  人民文学出版社  2008-12-1   498.00元\n",
      "[哥伦比亚] 加西亚·马尔克斯 , 范晔  南海出版公司  2011-6   39.50元\n",
      "[美国] 玛格丽特·米切尔 , 李美华  译林出版社  2000-9   40.00元\n",
      "[明] 罗贯中  人民文学出版社  1998-05   39.50元\n",
      "林奕含  北京联合出版公司  2018-2   45.00元\n",
      "[英] 乔治·奥威尔 , 荣如德  上海译文出版社  2007-3   10.00元\n",
      "[英] 阿·柯南道尔 , 丁钟华 等 , 群众出版社  1981-8  53.00元 68.00元\n",
      "[日] 东野圭吾 , 刘姿君  南海出版公司  2013-1-1   39.50元\n",
      "[法] 圣埃克苏佩里 , 马振聘  人民文学出版社  2003-8   22.00元\n",
      "三毛  哈尔滨出版社  2003-8   15.80元\n",
      "（丹麦）安徒生 , 叶君健  人民文学出版社  1997-08   25.00元\n",
      "金庸  生活·读书·新知三联书店  1994-5   96.00元\n",
      "鲁迅  人民文学出版社  1973-3   0.36元\n",
      "[德] 赫尔曼·黑塞 , 姜乙  天津人民出版社  2017-1   32.00元\n",
      "[美] 哈珀·李 , 高红梅  译林出版社  2012-9   32.00元\n",
      "【美】傅高义 (Ezra.F.Vogel) , 冯克利  生活·读书·新知三联书店  2013-1-18   88.00元\n",
      "当年明月  中国海关出版社  2009-4   358.20元\n",
      "[意] 埃莱娜·费兰特 , 陈英  人民文学出版社  2018-7   62.00元\n",
      "[意] 埃莱娜·费兰特 , 陈英  人民文学出版社  2017-4   59.00元\n",
      "王小波  中国青年出版社  1997-10   27.00元\n",
      "鲁迅  人民文学出版社  1973-3   0.20元\n"
     ]
    }
   ],
   "source": [
    "for book in doc.items('tr.item'):\n",
    "#     info_list = book('.info .pub').text()    # 用左下划线'/'分隔的字符串\n",
    "    info_list = book('p.pl').text().split('/')     # 以'/'为分隔符split，得到info_list列表\n",
    "#     print(info_list)\n",
    "#     print(info_list[-3])    # 用[]提取列表元素，例如倒数第3个是出版社，索引为-3\n",
    "    publisher = info_list[-3].strip()   # 以同样的方式获得authors, publisher, pub_time, price字段\n",
    "#     print(publisher)\n",
    "    pub_time = info_list[-2]\n",
    "    price = info_list[-1]\n",
    "    authors = ','.join(info_list[:-3])   # 将多个作者元素，组合到一个字符串里\n",
    "#     print(authors)\n",
    "    print(authors, publisher, pub_time, price)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f54e22b5",
   "metadata": {},
   "source": [
    "<center><font size=4><b>情况3：正则表达式提取</b></font></center>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "1df60a2d",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T16:52:39.085897Z",
     "start_time": "2023-08-08T16:52:39.075420Z"
    }
   },
   "outputs": [],
   "source": [
    "import re    # 导入re包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "for book in doc.items('tr.item'):\n",
    "    people_num_raw = book('span.pl').text()\n",
    "#     print(people_num_raw)\n",
    "#     print(re.findall('[0-9]+', people_num_raw))    # 匹配people_num_raw字段中的数字，获得列表\n",
    "#     print(re.findall('[0-9]+', people_num_raw)[0])   # 取列表中的第1个元素，索引为0\n",
    "    people_num = re.findall('[0-9]+', people_num_raw)[0]  # 放入people_num字段中\n",
    "    print(people_num)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0f4e0b6e",
   "metadata": {},
   "source": [
    "1. 将这些```字段组合成字典，放入列表```中\n",
    "2. 书名、作者、出版社等作为```key```，人类简史、尤瓦尔·赫拉利、中信出版社等作为```value```\n",
    "3. ```例子```如下："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "id": "8f68659e",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T16:52:39.816396Z",
     "start_time": "2023-08-08T16:52:39.808885Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[{'book_name': '人类简史：从动物到上帝', 'author': '尤瓦尔·赫拉利', 'publisher': '中信出版社'}, {'book_name': '理想国', 'author': '柏拉图', 'publisher': '商务印书馆'}, {'book_name': '社会契约论', 'author': '卢梭', 'publisher': '商务印书馆'}]\n",
      "数据类型为： <class 'list'>\n",
      "数据长度为： 3\n"
     ]
    }
   ],
   "source": [
    "bookinfo_list_tmp = [\n",
    "    {'book_name': '人类简史：从动物到上帝', 'author': '尤瓦尔·赫拉利', 'publisher': '中信出版社'},\n",
    "    {'book_name': '理想国', 'author': '柏拉图', 'publisher': '商务印书馆'},\n",
    "    {'book_name': '社会契约论', 'author': '卢梭', 'publisher': '商务印书馆'}\n",
    "    ]\n",
    "print(bookinfo_list_tmp)\n",
    "print('数据类型为：',type(bookinfo_list_tmp))   # 类型为list\n",
    "print('数据长度为：',len(bookinfo_list_tmp))    # 长度为3，即3本书的信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "10323adf",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T16:52:40.296694Z",
     "start_time": "2023-08-08T16:52:40.248690Z"
    }
   },
   "outputs": [],
   "source": [
    "bookinfo_list = []   # 生成空列表，用于存储书籍信息\n",
    "doc = PyQuery(html)\n",
    "for book in doc.items('tr.item'):\n",
    "    book_name = book('.pl2 a').text()    # 情况1：直接解析\n",
    "    desc = book('span.inq').text()\n",
    "    score = book('.rating_nums').text()\n",
    "    \n",
    "    info_list = book('p.pl').text().split('/')    # 情况2：提取列表元素\n",
    "    publisher = info_list[-3].strip()   \n",
    "    pub_time = info_list[-2]\n",
    "    price = info_list[-1]\n",
    "    authors = ''.join(info_list[:-3]) \n",
    "    \n",
    "    people_num_raw = book('span.pl').text()       # 情况3：正则表达式提取\n",
    "    people_num = re.findall('[0-9]+', people_num_raw)[0]\n",
    "    \n",
    "    bookinfo = {'book_name':book_name,   # 为每本书创建一个字典，不同字段建构不同键值对\n",
    "                 'authors':authors,\n",
    "                 'publisher':publisher,\n",
    "                 'pub_time':pub_time,\n",
    "                 'desc':desc,\n",
    "                 'score':score,\n",
    "                 'people_num':people_num,\n",
    "                 'price':price,\n",
    "                }\n",
    "    \n",
    "    bookinfo_list.append(bookinfo)      # 将字典添加进bookinfo_list列表中"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "fa981f16",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T16:52:40.830159Z",
     "start_time": "2023-08-08T16:52:40.818637Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'book_name': '顾城的诗',\n",
       "  'authors': '顾城 ',\n",
       "  'publisher': '人民文学出版社',\n",
       "  'pub_time': ' 1998-12 ',\n",
       "  'desc': '火焰是我们诗歌唯一的读者',\n",
       "  'score': '8.8',\n",
       "  'people_num': '26009',\n",
       "  'price': ' 20.00'},\n",
       " {'book_name': '会饮篇',\n",
       "  'authors': '[古希腊] 柏拉图  王太庆 ',\n",
       "  'publisher': '商务印书馆',\n",
       "  'pub_time': ' 2013-1 ',\n",
       "  'desc': '',\n",
       "  'score': '9.3',\n",
       "  'people_num': '11008',\n",
       "  'price': ' 12.00元'},\n",
       " {'book_name': '众病之王 : 癌症传',\n",
       "  'authors': '[美] 悉达多·穆克吉  李虎 ',\n",
       "  'publisher': '中信出版社',\n",
       "  'pub_time': ' 2013-2 ',\n",
       "  'desc': '癌症传',\n",
       "  'score': '9.0',\n",
       "  'people_num': '12983',\n",
       "  'price': ' 42.00元'},\n",
       " {'book_name': '火星救援',\n",
       "  'authors': '[美]安迪•威尔  陈灼 ',\n",
       "  'publisher': '译林出版社',\n",
       "  'pub_time': ' 2015-10 ',\n",
       "  'desc': '跟火星来一场不是你死就是我活的过家家游戏',\n",
       "  'score': '8.9',\n",
       "  'people_num': '19457',\n",
       "  'price': ' 38.00'},\n",
       " {'book_name': '父权制与资本主义',\n",
       "  'authors': '[日] 上野千鹤子  邹韵 ',\n",
       "  'publisher': '浙江大学出版社',\n",
       "  'pub_time': ' 2020-3 ',\n",
       "  'desc': '',\n",
       "  'score': '9.2',\n",
       "  'people_num': '16503',\n",
       "  'price': ' 58.00元'},\n",
       " {'book_name': '上学记',\n",
       "  'authors': '何兆武 口述 ',\n",
       "  'publisher': '生活·读书·新知三联书店',\n",
       "  'pub_time': ' 2006-8 ',\n",
       "  'desc': '20世纪中国知识分子的心灵史',\n",
       "  'score': '8.9',\n",
       "  'people_num': '14001',\n",
       "  'price': ' 19.80元'},\n",
       " {'book_name': '总统是靠不住的 : 近距离看美国之二',\n",
       "  'authors': '林达 ',\n",
       "  'publisher': '生活·读书·新知三联书店',\n",
       "  'pub_time': ' 2004-08 ',\n",
       "  'desc': '美国政治法律制度的基本原理和操作细节',\n",
       "  'score': '8.8',\n",
       "  'people_num': '20808',\n",
       "  'price': ' 21.80'},\n",
       " {'book_name': '李光耀观天下',\n",
       "  'authors': '李光耀 ',\n",
       "  'publisher': '北京大学出版社',\n",
       "  'pub_time': ' 2015-6 ',\n",
       "  'desc': '',\n",
       "  'score': '9.2',\n",
       "  'people_num': '11849',\n",
       "  'price': ' 58.00元'},\n",
       " {'book_name': '毛姆短篇小说精选集',\n",
       "  'authors': '[英] 威廉·萨默塞特·毛姆  冯亦代 ',\n",
       "  'publisher': '译林出版社',\n",
       "  'pub_time': ' 2012-11 ',\n",
       "  'desc': '在各种光怪陆离的场景中，迷失的人性引发了一连串的悲剧',\n",
       "  'score': '9.1',\n",
       "  'people_num': '12445',\n",
       "  'price': ' 36.00元'},\n",
       " {'book_name': '目送',\n",
       "  'authors': '龙应台 ',\n",
       "  'publisher': '生活·读书·新知三联书店',\n",
       "  'pub_time': ' 2009-10 ',\n",
       "  'desc': '不必追',\n",
       "  'score': '8.6',\n",
       "  'people_num': '210667',\n",
       "  'price': ' 39.00元'},\n",
       " {'book_name': '规训与惩罚 : 监狱的诞生',\n",
       "  'authors': '[法] 米歇尔·福柯  刘北成 ',\n",
       "  'publisher': '生活·读书·新知三联书店',\n",
       "  'pub_time': ' 2003-1 ',\n",
       "  'desc': '伴随着惩罚的人性化，自由反而日益丧失了',\n",
       "  'score': '9.3',\n",
       "  'people_num': '10528',\n",
       "  'price': ' 21.80元'},\n",
       " {'book_name': '亲爱的安德烈',\n",
       "  'authors': '龙应台 ',\n",
       "  'publisher': '人民文学出版社',\n",
       "  'pub_time': ' 2008-12 ',\n",
       "  'desc': '弭平代沟，跨越文化阻隔',\n",
       "  'score': '8.6',\n",
       "  'people_num': '121023',\n",
       "  'price': ' 26.00'},\n",
       " {'book_name': '时间的秩序',\n",
       "  'authors': '[意] 卡洛·罗韦利  杨光 ',\n",
       "  'publisher': '湖南科学技术出版社',\n",
       "  'pub_time': ' 2019-6 ',\n",
       "  'desc': '',\n",
       "  'score': '8.9',\n",
       "  'people_num': '21305',\n",
       "  'price': ' 56.00元'},\n",
       " {'book_name': '金锁记',\n",
       "  'authors': '张爱玲 ',\n",
       "  'publisher': '哈尔滨出版社',\n",
       "  'pub_time': ' 2005-6 ',\n",
       "  'desc': '一个小商人家庭出身的女子曹七巧的心灵变迁历程',\n",
       "  'score': '8.6',\n",
       "  'people_num': '61948',\n",
       "  'price': ' 13.5元'},\n",
       " {'book_name': '从一到无穷大 : 科学中的事实和臆测',\n",
       "  'authors': '[美] G. 伽莫夫  暴永宁 译 ',\n",
       "  'publisher': '科学出版社',\n",
       "  'pub_time': ' 2002-11 ',\n",
       "  'desc': '科学中的事实和臆测',\n",
       "  'score': '9.1',\n",
       "  'people_num': '13875',\n",
       "  'price': ' 29.00元'},\n",
       " {'book_name': '认识电影 : 插图第11版',\n",
       "  'authors': '[美] 路易斯·贾内梯  焦雄屏 ',\n",
       "  'publisher': '世界图书出版公司',\n",
       "  'pub_time': ' 2007-11 ',\n",
       "  'desc': '电影入门经典之作',\n",
       "  'score': '8.9',\n",
       "  'people_num': '18370',\n",
       "  'price': ' 68.00元'},\n",
       " {'book_name': '分成两半的子爵',\n",
       "  'authors': '[意] 伊塔洛·卡尔维诺  吴正仪 ',\n",
       "  'publisher': '译林出版社',\n",
       "  'pub_time': ' 2012-4-1 ',\n",
       "  'desc': '',\n",
       "  'score': '8.8',\n",
       "  'people_num': '26354',\n",
       "  'price': ' 20.00元'},\n",
       " {'book_name': '帷幕 : 阿加莎·克里斯蒂侦探作品集33',\n",
       "  'authors': '[英] 阿加莎·克里斯蒂  李杨 ',\n",
       "  'publisher': '新星出版社',\n",
       "  'pub_time': ' 2015-2 ',\n",
       "  'desc': '',\n",
       "  'score': '9.1',\n",
       "  'people_num': '14610',\n",
       "  'price': ' 26.00'},\n",
       " {'book_name': '跨越边界的社区（修订版） : 北京“浙江村”的生活史',\n",
       "  'authors': '项飙 ',\n",
       "  'publisher': '生活·读书·新知三联书店',\n",
       "  'pub_time': ' 2018-3 ',\n",
       "  'desc': '',\n",
       "  'score': '9.5',\n",
       "  'people_num': '9005',\n",
       "  'price': ' 68.00元'},\n",
       " {'book_name': '坟',\n",
       "  'authors': '鲁迅 ',\n",
       "  'publisher': '人民文学出版社',\n",
       "  'pub_time': ' 2006-12 ',\n",
       "  'desc': '',\n",
       "  'score': '9.6',\n",
       "  'people_num': '11445',\n",
       "  'price': ' 16.00元'},\n",
       " {'book_name': '中国哲学简史',\n",
       "  'authors': '冯友兰  赵复三 ',\n",
       "  'publisher': '新世界出版社',\n",
       "  'pub_time': ' 2004-1 ',\n",
       "  'desc': '中国哲学入门书',\n",
       "  'score': '8.9',\n",
       "  'people_num': '19942',\n",
       "  'price': ' 38.00元'},\n",
       " {'book_name': '青铜时代 : 时代三部曲',\n",
       "  'authors': '王小波 ',\n",
       "  'publisher': '花城出版社',\n",
       "  'pub_time': ' 1997-5 ',\n",
       "  'desc': '唐人传奇贯注现代情趣',\n",
       "  'score': '8.8',\n",
       "  'people_num': '26772',\n",
       "  'price': ' 29.00元'},\n",
       " {'book_name': '荆棘鸟',\n",
       "  'authors': '[澳] 考琳·麦卡洛  曾胡 ',\n",
       "  'publisher': '译林出版社',\n",
       "  'pub_time': ' 1998-7 ',\n",
       "  'desc': '澳洲乱世情',\n",
       "  'score': '8.6',\n",
       "  'people_num': '51943',\n",
       "  'price': ' 28.00元'},\n",
       " {'book_name': '黑箱：日本之耻',\n",
       "  'authors': '[日]伊藤诗织  匡匡  雅众文化',\n",
       "  'publisher': '中信出版集团',\n",
       "  'pub_time': ' 2019-4 ',\n",
       "  'desc': '',\n",
       "  'score': '8.9',\n",
       "  'people_num': '22009',\n",
       "  'price': ' 48.00元'},\n",
       " {'book_name': '如父如子',\n",
       "  'authors': '[日] 是枝裕和  丹勇 ',\n",
       "  'publisher': '湖南文艺出版社',\n",
       "  'pub_time': ' 2018-4 ',\n",
       "  'desc': '',\n",
       "  'score': '8.9',\n",
       "  'people_num': '26333',\n",
       "  'price': ' 49.80'}]"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bookinfo_list\n",
    "# len(bookinfo_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "c6e09979",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T16:52:41.315680Z",
     "start_time": "2023-08-08T16:52:41.307699Z"
    }
   },
   "outputs": [],
   "source": [
    "# 函数：解析数据  extract_bookinfo_list(html)\n",
    "# 参数说明：html为网页源代码的字符串\n",
    "# 返回值：bookinfo_list为书籍的字典列表\n",
    "def extract_bookinfo_list(html):         # 添加：定义函数名\n",
    "    bookinfo_list = []\n",
    "    doc = PyQuery(html)\n",
    "    for book in doc.items('tr.item'):\n",
    "        try:                             # 添加：try语句，避免特殊网页中断整个循环\n",
    "            book_name = book('.pl2 a').text()    \n",
    "            desc = book('span.inq').text()\n",
    "            score = book('.rating_nums').text()\n",
    "            info_list = book('p.pl').text().split('/')    \n",
    "            publisher = info_list[-3].strip()   \n",
    "            pub_time = info_list[-2]\n",
    "            price = info_list[-1]\n",
    "            authors = ''.join(info_list[:-3])\n",
    "            people_num_raw = book('span.pl').text()       \n",
    "            people_num = re.findall('[0-9]+', people_num_raw)[0]\n",
    "\n",
    "            bookinfo = {'book_name':book_name,\n",
    "                         'authors':authors,\n",
    "                         'publisher':publisher,\n",
    "                         'pub_time':pub_time,\n",
    "                         'desc':desc,\n",
    "                         'score':score,\n",
    "                         'people_num':people_num,\n",
    "                         'price':price,\n",
    "                        }\n",
    "\n",
    "            bookinfo_list.append(bookinfo)\n",
    "        except:                        # 添加：except和pass语句，如果碰到bug，那么跳出此次循环、不执行任何操作，进行下一次循环\n",
    "            pass\n",
    "        \n",
    "    return bookinfo_list               # 添加：返回书籍的字典列表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "db413d7c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'\\n\\n<!DOCTYPE html>\\n<html lang=\"zh-cmn-Hans\" class=\"ua-windows ua-webkit book-new-nav\">\\n<head>\\n  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\\n  <title>豆瓣读书 Top 250</title>\\n  \\n<script>!function(e){var o=function(o,n,t){var c,i,r=new Date;n=n||30,t=t||\"/\",r.setTime(r.getTime()+24*n*60*60*1e3),c=\"; expires=\"+r.toGMTString();for(i in o)e.cookie=i+\"=\"+o[i]+c+\"; path=\"+t},n=function(o){var n,t,c,i=o+\"=\",r=e.cookie.split(\";\");for(t=0,c=r.length;t<c;t++)if(n=r[t].replace(/^\\\\s+|\\\\s+$/g,\"\"),0==n.indexOf(i))return n.substring(i.length,n.length).replace(/\\\\\"/g,\"\");return null},t=e.write,c={\"douban.com\":1,\"douban.fm\":1,\"google.com\":1,\"google.cn\":1,\"googleapis.com\":1,\"gmaptiles.co.kr\":1,\"gstatic.com\":1,\"gstatic.cn\":1,\"google-analytics.com\":1,\"googleadservices.com\":1},i=function(e,o){var n=new Image;n.onload=function(){},n.src=\"https://www.douban.com/j/except_report?kind=ra022&reason=\"+encodeURIComponent(e)+\"&environment=\"+encodeURIComponent(o)},r=function(o){try{t.call(e,o)}catch(e){t(o)}},a=/<script.*?src\\\\=[\"\\']?([^\"\\'\\\\s>]+)/gi,g=/http:\\\\/\\\\/(.+?)\\\\.([^\\\\/]+).+/i;e.writeln=e.write=function(e){var t,l=a.exec(e);return l&&(t=g.exec(l[1]))?c[t[2]]?void r(e):void(\"tqs\"!==n(\"hj\")&&(i(l[1],location.href),o({hj:\"tqs\"},1),setTimeout(function(){location.replace(location.href)},50))):void r(e)}}(document);</script>\\n\\n  \\n  <meta http-equiv=\"Pragma\" content=\"no-cache\">\\n  <meta http-equiv=\"Expires\" content=\"Sun, 6 Mar 2005 01:00:00 GMT\">\\n  \\n  <script>var _head_start = new Date();</script>\\n  \\n  <link href=\"https://img1.doubanio.com/f/vendors/02814fbb5bee25484516bd0a642af695f7ec5a83/css/douban.css\" rel=\"stylesheet\" type=\"text/css\">\\n  <link href=\"https://img2.doubanio.com/cuphead/book-static/common/master.dd2c2.css\" rel=\"stylesheet\" type=\"text/css\">\\n\\n  <link href=\"https://img2.doubanio.com/cuphead/book-static/base/init.e399f.css\" rel=\"stylesheet\">\\n  <style type=\"text/css\"></style>\\n  <script src=\"https://img1.doubanio.com/f/vendors/0511abe9863c2ea7084efa7e24d1d86c5b3974f1/js/jquery-1.10.2.min.js\"></script>\\n  <script src=\"https://img1.doubanio.com/f/vendors/aa9559674f2476cdc16f755b3cdc4ebc478db669/js/douban.js\"></script>\\n  <script src=\"https://img1.doubanio.com/cuphead/book-static/common/master.307d7.js\"></script>\\n  \\n\\n  \\n  <script>  </script>\\n  <!-- COLLECTED CSS -->\\n\\n  <link rel=\"shortcut icon\" href=\"https://img1.doubanio.com/favicon.ico\" type=\"image/x-icon\">\\n</head>\\n<body>\\n  \\n    <script>var _body_start = new Date();</script>\\n    \\n  \\n\\n\\n\\n    <link href=\"//img3.doubanio.com/dae/accounts/resources/164cfd8/shire/bundle.css\" rel=\"stylesheet\" type=\"text/css\">\\n\\n\\n\\n<div id=\"db-global-nav\" class=\"global-nav\">\\n  <div class=\"bd\">\\n    \\n<div class=\"top-nav-info\">\\n  <a href=\"https://accounts.douban.com/passport/login?source=book\" class=\"nav-login\" rel=\"nofollow\">登录/注册</a>\\n</div>\\n\\n\\n    <div class=\"top-nav-doubanapp\">\\n  <a href=\"https://www.douban.com/doubanapp/app?channel=top-nav\" class=\"lnk-doubanapp\">下载豆瓣客户端</a>\\n  <div id=\"doubanapp-tip\">\\n    <a href=\"https://www.douban.com/doubanapp/app?channel=qipao\" class=\"tip-link\">豆瓣 <span class=\"version\">6.0</span> 全新发布</a>\\n    <a href=\"javascript: void 0;\" class=\"tip-close\">×</a>\\n  </div>\\n  <div id=\"top-nav-appintro\" class=\"more-items\">\\n    <p class=\"appintro-title\">豆瓣</p>\\n    <p class=\"qrcode\">扫码直接下载</p>\\n    <div class=\"download\">\\n      <a href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&direct_dl=1&download=iOS\">iPhone</a>\\n      <span>·</span>\\n      <a href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&direct_dl=1&download=Android\" class=\"download-android\">Android</a>\\n    </div>\\n  </div>\\n</div>\\n\\n    \\n\\n\\n<div class=\"global-nav-items\">\\n  <ul>\\n    <li class=\"\">\\n      <a href=\"https://www.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-main&quot;,&quot;uid&quot;:&quot;0&quot;}\">豆瓣</a>\\n    </li>\\n    <li class=\"on\">\\n      <a href=\"https://book.douban.com\"  data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-book&quot;,&quot;uid&quot;:&quot;0&quot;}\">读书</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://movie.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-movie&quot;,&quot;uid&quot;:&quot;0&quot;}\">电影</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://music.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-music&quot;,&quot;uid&quot;:&quot;0&quot;}\">音乐</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://www.douban.com/location\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-location&quot;,&quot;uid&quot;:&quot;0&quot;}\">同城</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://www.douban.com/group\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-group&quot;,&quot;uid&quot;:&quot;0&quot;}\">小组</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://read.douban.com&#47;?dcs=top-nav&amp;dcm=douban\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-read&quot;,&quot;uid&quot;:&quot;0&quot;}\">阅读</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://fm.douban.com&#47;?from_=shire_top_nav\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-fm&quot;,&quot;uid&quot;:&quot;0&quot;}\">FM</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://time.douban.com&#47;?dt_time_source=douban-web_top_nav\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-time&quot;,&quot;uid&quot;:&quot;0&quot;}\">时间</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://market.douban.com&#47;?utm_campaign=douban_top_nav&amp;utm_source=douban&amp;utm_medium=pc_web\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-market&quot;,&quot;uid&quot;:&quot;0&quot;}\">豆品</a>\\n    </li>\\n  </ul>\\n</div>\\n\\n  </div>\\n</div>\\n<script>\\n  ;window._GLOBAL_NAV = {\\n    DOUBAN_URL: \"https://www.douban.com\",\\n    N_NEW_NOTIS: 0,\\n    N_NEW_DOUMAIL: 0\\n  };\\n</script>\\n\\n\\n\\n    <script src=\"//img3.doubanio.com/dae/accounts/resources/164cfd8/shire/bundle.js\" defer=\"defer\"></script>\\n\\n\\n\\n\\n  \\n\\n\\n\\n    <link href=\"//img3.doubanio.com/dae/accounts/resources/164cfd8/book/bundle.css\" rel=\"stylesheet\" type=\"text/css\">\\n\\n\\n\\n\\n<div id=\"db-nav-book\" class=\"nav\">\\n  <div class=\"nav-wrap\">\\n  <div class=\"nav-primary\">\\n    <div class=\"nav-logo\">\\n      <a href=\"https:&#47;&#47;book.douban.com\">豆瓣读书</a>\\n    </div>\\n    <div class=\"nav-search\">\\n      <form action=\"https:&#47;&#47;search.douban.com&#47;book/subject_search\" method=\"get\">\\n        <fieldset>\\n          <legend>搜索：</legend>\\n          <label for=\"inp-query\">\\n          </label>\\n          <div class=\"inp\"><input id=\"inp-query\" name=\"search_text\" size=\"22\" maxlength=\"60\" placeholder=\"书名、作者、ISBN\" value=\"\"></div>\\n          <div class=\"inp-btn\"><input type=\"submit\" value=\"搜索\"></div>\\n          <input type=\"hidden\" name=\"cat\" value=\"1001\" />\\n        </fieldset>\\n      </form>\\n    </div>\\n  </div>\\n  </div>\\n  <div class=\"nav-secondary\">\\n    \\n\\n<div class=\"nav-items\">\\n  <ul>\\n    <li    ><a href=\"https://book.douban.com/cart/\"\\n     >购书单</a>\\n    </li>\\n    <li    ><a href=\"https://read.douban.com/ebooks/?dcs=book-nav&dcm=douban\"\\n            target=\"_blank\"\\n     >电子图书</a>\\n    </li>\\n    <li    ><a href=\"https://market.douban.com/book?utm_campaign=book_nav_freyr&utm_source=douban&utm_medium=pc_web\"\\n     >豆瓣书店</a>\\n    </li>\\n    <li    ><a href=\"https://book.douban.com/annual/2022?fullscreen=1&source=navigation\"\\n            target=\"_blank\"\\n     >2022年度榜单</a>\\n    </li>\\n    <li    ><a href=\"https://standbyme2022.douban.com/?autorotate=false&fullscreen=true&hidenav=true&source=web_navigation\"\\n            target=\"_blank\"\\n     >2022书影音报告</a>\\n    </li>\\n    <li          class=\" book-cart\"\\n    ><a href=\"https://market.douban.com/cart/?biz_type=book&utm_campaign=book_nav_cart&utm_source=douban&utm_medium=pc_web\"\\n            target=\"_blank\"\\n     >购物车</a>\\n    </li>\\n  </ul>\\n</div>\\n\\n    <a href=\"https://book.douban.com/annual/2022?fullscreen=1&source=book_navigation\" class=\"bookannual\"></a>\\n  </div>\\n</div>\\n\\n<script id=\"suggResult\" type=\"text/x-jquery-tmpl\">\\n  <li data-link=\"{{= url}}\">\\n            <a href=\"{{= url}}\" onclick=\"moreurl(this, {from:\\'book_search_sugg\\', query:\\'{{= keyword }}\\', subject_id:\\'{{= id}}\\', i: \\'{{= index}}\\', type: \\'{{= type}}\\'})\">\\n            <img src=\"{{= pic}}\" width=\"40\" />\\n            <div>\\n                <em>{{= title}}</em>\\n                {{if year}}\\n                    <span>{{= year}}</span>\\n                {{/if}}\\n                <p>\\n                {{if type == \"b\"}}\\n                    {{= author_name}}\\n                {{else type == \"a\" }}\\n                    {{if en_name}}\\n                        {{= en_name}}\\n                    {{/if}}\\n                {{/if}}\\n                 </p>\\n            </div>\\n        </a>\\n        </li>\\n  </script>\\n\\n\\n\\n\\n    <script src=\"//img3.doubanio.com/dae/accounts/resources/164cfd8/book/bundle.js\" defer=\"defer\"></script>\\n\\n\\n\\n\\n\\n    <div id=\"wrapper\">\\n        \\n        \\n  <div id=\"content\">\\n    \\n    <h1>豆瓣读书 Top 250</h1>\\n\\n    <div class=\"grid-16-8 clearfix\">\\n      \\n      <div class=\"article\">\\n  <div class=\"indent\">\\n    \\n  \\n\\n        <p class=\"ulfirst\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1007305/\"\\n              onclick=\"moreurl(this,{i:\\'0\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1070959.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1007305/\" onclick=&#34;moreurl(this,{i:&#39;0&#39;})&#34; title=\"红楼梦\"\\n                \\n              >\\n                红楼梦\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">[清] 曹雪芹 著 / 人民文学出版社 / 1996-12 / 59.70元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar50\"></span>\\n                  <span class=\"rating_nums\">9.6</span>\\n\\n                <span class=\"pl\">(\\n                    413884人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">都云作者痴，谁解其中味？</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/4913064/\"\\n              onclick=\"moreurl(this,{i:\\'1\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s29053580.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/4913064/\" onclick=&#34;moreurl(this,{i:&#39;1&#39;})&#34; title=\"活着\"\\n                \\n              >\\n                活着\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">余华 / 作家出版社 / 2012-8-1 / 20.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.4</span>\\n\\n                <span class=\"pl\">(\\n                    806547人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">生的苦难与伟大</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/4820710/\"\\n              onclick=\"moreurl(this,{i:\\'2\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s4371408.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/4820710/\" onclick=&#34;moreurl(this,{i:&#39;2&#39;})&#34; title=\"1984\"\\n                \\n              >\\n                1984\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Nineteen Eighty-Four</span>\\n            </div>\\n\\n              <p class=\"pl\">[英] 乔治·奥威尔 / 刘绍铭 / 北京十月文艺出版社 / 2010-4-1 / 28.00</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.4</span>\\n\\n                <span class=\"pl\">(\\n                    275814人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">栗树荫下，我出卖你，你出卖我</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/6518605/\"\\n              onclick=\"moreurl(this,{i:\\'3\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s30016152.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/6518605/\" onclick=&#34;moreurl(this,{i:&#39;3&#39;})&#34; title=\"三体全集\"\\n                \\n              >\\n                三体全集\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 地球往事三部曲 </span>\\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">刘慈欣 / 重庆出版社 / 2012-1 / 168.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar50\"></span>\\n                  <span class=\"rating_nums\">9.5</span>\\n\\n                <span class=\"pl\">(\\n                    178124人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">地球往事三部曲</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/24531956/\"\\n              onclick=\"moreurl(this,{i:\\'4\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s29101586.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/24531956/\" onclick=&#34;moreurl(this,{i:&#39;4&#39;})&#34; title=\"哈利·波特\"\\n                \\n              >\\n                哈利·波特\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Harry Potter</span>\\n            </div>\\n\\n              <p class=\"pl\">J.K.罗琳 (J.K.Rowling) / 苏农 / 人民文学出版社 / 2008-12-1 / 498.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar50\"></span>\\n                  <span class=\"rating_nums\">9.7</span>\\n\\n                <span class=\"pl\">(\\n                    99448人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">从9¾站台开始的旅程</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/6082808/\"\\n              onclick=\"moreurl(this,{i:\\'5\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s27237850.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/6082808/\" onclick=&#34;moreurl(this,{i:&#39;5&#39;})&#34; title=\"百年孤独\"\\n                \\n              >\\n                百年孤独\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Cien años de soledad</span>\\n            </div>\\n\\n              <p class=\"pl\">[哥伦比亚] 加西亚·马尔克斯 / 范晔 / 南海出版公司 / 2011-6 / 39.50元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    414700人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">魔幻现实主义文学代表作</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1068920/\"\\n              onclick=\"moreurl(this,{i:\\'6\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1078958.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1068920/\" onclick=&#34;moreurl(this,{i:&#39;6&#39;})&#34; title=\"飘\"\\n                \\n              >\\n                飘\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Gone with the Wind</span>\\n            </div>\\n\\n              <p class=\"pl\">[美国] 玛格丽特·米切尔 / 李美华 / 译林出版社 / 2000-9 / 40.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    208438人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">革命时期的爱情，随风而逝</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1019568/\"\\n              onclick=\"moreurl(this,{i:\\'7\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1076932.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1019568/\" onclick=&#34;moreurl(this,{i:&#39;7&#39;})&#34; title=\"三国演义（全二册）\"\\n                \\n              >\\n                三国演义（全二册）\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">[明] 罗贯中 / 人民文学出版社 / 1998-05 / 39.50元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    164241人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">是非成败转头空</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/27614904/\"\\n              onclick=\"moreurl(this,{i:\\'8\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s29651121.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/27614904/\" onclick=&#34;moreurl(this,{i:&#39;8&#39;})&#34; title=\"房思琪的初恋乐园\"\\n                \\n              >\\n                房思琪的初恋乐园\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">林奕含 / 北京联合出版公司 / 2018-2 / 45.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    366759人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">向死而生的文学绝唱</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/2035179/\"\\n              onclick=\"moreurl(this,{i:\\'9\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s2347590.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/2035179/\" onclick=&#34;moreurl(this,{i:&#39;9&#39;})&#34; title=\"动物农场\"\\n                \\n              >\\n                动物农场\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Animal Farm</span>\\n            </div>\\n\\n              <p class=\"pl\">[英] 乔治·奥威尔 / 荣如德 / 上海译文出版社 / 2007-3 / 10.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    154292人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">太阳底下并无新事</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1040211/\"\\n              onclick=\"moreurl(this,{i:\\'10\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1229240.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1040211/\" onclick=&#34;moreurl(this,{i:&#39;10&#39;})&#34; title=\"福尔摩斯探案全集（上中下）\"\\n                \\n              >\\n                福尔摩斯探案全集（上中下）\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">[英] 阿·柯南道尔 / 丁钟华 等 / 群众出版社 / 1981-8 / 53.00元/68.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    130421人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">名侦探的代名词</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/10554308/\"\\n              onclick=\"moreurl(this,{i:\\'11\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s24514468.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/10554308/\" onclick=&#34;moreurl(this,{i:&#39;11&#39;})&#34; title=\"白夜行\"\\n                \\n              >\\n                白夜行\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">[日] 东野圭吾 / 刘姿君 / 南海出版公司 / 2013-1-1 / 39.50元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    458438人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">一宗离奇命案牵出跨度近20年步步惊心的故事</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1084336/\"\\n              onclick=\"moreurl(this,{i:\\'12\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1103152.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1084336/\" onclick=&#34;moreurl(this,{i:&#39;12&#39;})&#34; title=\"小王子\"\\n                \\n              >\\n                小王子\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Le Petit Prince</span>\\n            </div>\\n\\n              <p class=\"pl\">[法] 圣埃克苏佩里 / 马振聘 / 人民文学出版社 / 2003-8 / 22.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.1</span>\\n\\n                <span class=\"pl\">(\\n                    743056人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">献给长成了大人的孩子们</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1060068/\"\\n              onclick=\"moreurl(this,{i:\\'13\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1369343.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1060068/\" onclick=&#34;moreurl(this,{i:&#39;13&#39;})&#34; title=\"撒哈拉的故事\"\\n                \\n              >\\n                撒哈拉的故事\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">三毛 / 哈尔滨出版社 / 2003-8 / 15.80元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    167773人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">游荡的自由灵魂</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1046209/\"\\n              onclick=\"moreurl(this,{i:\\'14\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s1034062.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1046209/\" onclick=&#34;moreurl(this,{i:&#39;14&#39;})&#34; title=\"安徒生童话故事集\"\\n                \\n              >\\n                安徒生童话故事集\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">（丹麦）安徒生 / 叶君健 / 人民文学出版社 / 1997-08 / 25.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    129084人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">为了争取未来的一代</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1255625/\"\\n              onclick=\"moreurl(this,{i:\\'15\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s26018275.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1255625/\" onclick=&#34;moreurl(this,{i:&#39;15&#39;})&#34; title=\"天龙八部\"\\n                \\n              >\\n                天龙八部\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">金庸 / 生活·读书·新知三联书店 / 1994-5 / 96.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    130360人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">有情皆孽，无人不冤</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1449351/\"\\n              onclick=\"moreurl(this,{i:\\'16\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s34099286.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1449351/\" onclick=&#34;moreurl(this,{i:&#39;16&#39;})&#34; title=\"呐喊\"\\n                \\n              >\\n                呐喊\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">鲁迅 / 人民文学出版社 / 1973-3 / 0.36元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    155483人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">新文学的第一声呐喊</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/26980487/\"\\n              onclick=\"moreurl(this,{i:\\'17\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s29396368.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/26980487/\" onclick=&#34;moreurl(this,{i:&#39;17&#39;})&#34; title=\"悉达多\"\\n                \\n              >\\n                悉达多\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 一首印度的诗 </span>\\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Siddhartha</span>\\n            </div>\\n\\n              <p class=\"pl\">[德] 赫尔曼·黑塞 / 姜乙 / 天津人民出版社 / 2017-1 / 32.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    87150人评价\\n                )</span>\\n              </div>\\n\\n            \\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/6781808/\"\\n              onclick=\"moreurl(this,{i:\\'18\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s23128183.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/6781808/\" onclick=&#34;moreurl(this,{i:&#39;18&#39;})&#34; title=\"杀死一只知更鸟\"\\n                \\n              >\\n                杀死一只知更鸟\\n\\n                \\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">To Kill a Mocking Bird</span>\\n            </div>\\n\\n              <p class=\"pl\">[美] 哈珀·李 / 高红梅 / 译林出版社 / 2012-9 / 32.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    141849人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">有一种东西不能遵循从众原则，那就是——人的良心</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/20424526/\"\\n              onclick=\"moreurl(this,{i:\\'19\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s24516687.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/20424526/\" onclick=&#34;moreurl(this,{i:&#39;19&#39;})&#34; title=\"邓小平时代\"\\n                \\n              >\\n                邓小平时代\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Deng Xiaoping and the Transformation of China</span>\\n            </div>\\n\\n              <p class=\"pl\">【美】傅高义 (Ezra.F.Vogel) / 冯克利 / 生活·读书·新知三联书店 / 2013-1-18 / 88.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.3</span>\\n\\n                <span class=\"pl\">(\\n                    65888人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">个人命运背后的历史变局</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/3674537/\"\\n              onclick=\"moreurl(this,{i:\\'20\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s3745215.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/3674537/\" onclick=&#34;moreurl(this,{i:&#39;20&#39;})&#34; title=\"明朝那些事儿（1-9）\"\\n                \\n              >\\n                明朝那些事儿（1-9）\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 限量版 </span>\\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">当年明月 / 中国海关出版社 / 2009-4 / 358.20元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    166331人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">不拘一格的历史书写</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/30172069/\"\\n              onclick=\"moreurl(this,{i:\\'21\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s29799269.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/30172069/\" onclick=&#34;moreurl(this,{i:&#39;21&#39;})&#34; title=\"失踪的孩子\"\\n                \\n              >\\n                失踪的孩子\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 那不勒斯四部曲4 </span>\\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Storia della bambina perduta</span>\\n            </div>\\n\\n              <p class=\"pl\">[意] 埃莱娜·费兰特 / 陈英 / 人民文学出版社 / 2018-7 / 62.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    76813人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">我的整个生命，只是一场为了提升社会地位的低俗斗争。</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/26986954/\"\\n              onclick=\"moreurl(this,{i:\\'22\\'})\"\\n\\n              >\\n              <img src=\"https://img9.doubanio.com/view/subject/s/public/s29376146.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/26986954/\" onclick=&#34;moreurl(this,{i:&#39;22&#39;})&#34; title=\"新名字的故事\"\\n                \\n              >\\n                新名字的故事\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 那不勒斯四部曲2 </span>\\n              </a>\\n\\n\\n\\n                &nbsp; <img src=\"/pics/read.gif\" alt=\"可试读\" title=\"可试读\"/>\\n\\n              \\n                <br/>\\n                <span style=\"font-size:12px;\">Storia del nuovo cognome</span>\\n            </div>\\n\\n              <p class=\"pl\">[意] 埃莱娜·费兰特 / 陈英 / 人民文学出版社 / 2017-4 / 59.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.2</span>\\n\\n                <span class=\"pl\">(\\n                    87335人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">探索青年时代的激情、困惑、挣扎、背叛和失去</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1054685/\"\\n              onclick=\"moreurl(this,{i:\\'23\\'})\"\\n\\n              >\\n              <img src=\"https://img1.doubanio.com/view/subject/s/public/s1447349.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1054685/\" onclick=&#34;moreurl(this,{i:&#39;23&#39;})&#34; title=\"沉默的大多数\"\\n                \\n              >\\n                沉默的大多数\\n\\n                \\n                  <span style=\"font-size:12px;\"> : 王小波杂文随笔全编 </span>\\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">王小波 / 中国青年出版社 / 1997-10 / 27.00元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar45\"></span>\\n                  <span class=\"rating_nums\">9.1</span>\\n\\n                <span class=\"pl\">(\\n                    147835人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">沉默是沉默者的通行证</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n        <p class=\"ul\"></p>\\n\\n      \\n  \\n\\n      <table width=\"100%\">\\n        <tr class=\"item\">\\n          <td width=\"100\" valign=\"top\">\\n            <a class=\"nbg\" href=\"https://book.douban.com/subject/1915958/\"\\n              onclick=\"moreurl(this,{i:\\'24\\'})\"\\n\\n              >\\n              <img src=\"https://img2.doubanio.com/view/subject/s/public/s34099301.jpg\" width=\"90\" />\\n            </a>\\n          </td>\\n          <td valign=\"top\">\\n            \\n            <div class=\"pl2\">\\n\\n\\n              <a href=\"https://book.douban.com/subject/1915958/\" onclick=&#34;moreurl(this,{i:&#39;24&#39;})&#34; title=\"野草\"\\n                \\n              >\\n                野草\\n\\n                \\n              </a>\\n\\n\\n\\n\\n              \\n            </div>\\n\\n              <p class=\"pl\">鲁迅 / 人民文学出版社 / 1973-3 / 0.20元</p>\\n\\n            \\n\\n              \\n              <div class=\"star clearfix\">\\n                  <span class=\"allstar50\"></span>\\n                  <span class=\"rating_nums\">9.5</span>\\n\\n                <span class=\"pl\">(\\n                    44970人评价\\n                )</span>\\n              </div>\\n\\n            \\n              <p class=\"quote\" style=\"margin: 10px 0; color: #666\">\\n                  <span class=\"inq\">我以这一丛野草，在明与暗，生与死，过去与未来之际，献于友与仇，人与兽，爱者与不爱者之前作证。</span>\\n              </p>\\n\\n\\n          </td>\\n        </tr>\\n      </table>\\n\\n    \\n    \\n    \\n    \\n        <div class=\"paginator\">\\n        <span class=\"prev\">\\n            &lt;前页\\n        </span>\\n        \\n        \\n\\n                <span class=\"thispage\">1</span>\\n                \\n            <a href=\"https://book.douban.com/top250?start=25\" >2</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=50\" >3</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=75\" >4</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=100\" >5</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=125\" >6</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=150\" >7</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=175\" >8</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=200\" >9</a>\\n        \\n                \\n            <a href=\"https://book.douban.com/top250?start=225\" >10</a>\\n        \\n        <span class=\"next\">\\n            <link rel=\"next\" href=\"https://book.douban.com/top250?start=25\"/>\\n            <a href=\"https://book.douban.com/top250?start=25\" >后页&gt;</a>\\n        </span>\\n\\n        </div>\\n\\n\\n  </div>\\n</div>\\n      <div class=\"aside\">\\n        \\n  <span class=\"indent pl\">\\n    豆瓣用户每天都在对“读过”的书进行“很差”到“力荐”的评价，豆瓣根据每本书读过的人数以及该书所得的评价等综合数据，通过算法分析产生了豆瓣读书 Top 250。\\n  </span>\\n\\n      </div>\\n      <div class=\"extra\">\\n        \\n      </div>\\n    </div>\\n  </div>\\n\\n        \\n  <div id=\"footer\">\\n    \\n<span id=\"icp\" class=\"fleft gray-link\">\\n    &copy; 2005－2023 douban.com, all rights reserved 北京豆网科技有限公司\\n</span>\\n\\n<a href=\"https://www.douban.com/hnypt/variformcyst.py\" style=\"display: none;\"></a>\\n\\n<span class=\"fright\">\\n    <a href=\"https://www.douban.com/about\">关于豆瓣</a>\\n    · <a href=\"https://www.douban.com/jobs\">在豆瓣工作</a>\\n    · <a href=\"https://www.douban.com/about?topic=contactus\">联系我们</a>\\n    · <a href=\"https://www.douban.com/about/legal\">法律声明</a>\\n    \\n    · <a href=\"https://help.douban.com/?app=book\" target=\"_blank\">帮助中心</a>\\n    · <a href=\"https://book.douban.com/library_invitation\">图书馆合作</a>\\n    · <a href=\"https://www.douban.com/doubanapp/\">移动应用</a>\\n    · <a href=\"https://www.douban.com/partner/\">豆瓣广告</a>\\n</span>\\n\\n  </div>\\n\\n    </div>\\n      \\n\\n    <!-- COLLECTED JS -->\\n    <!-- mako -->\\n    \\n    \\n  \\n\\n<script type=\"text/javascript\">\\n  var _paq = _paq || [];\\n  _paq.push([\\'trackPageView\\']);\\n  _paq.push([\\'enableLinkTracking\\']);\\n  (function() {\\n    var p=((\\'https:\\' == document.location.protocol) ? \\'https\\' : \\'http\\'), u=p+\\'://fundin.douban.com/\\';\\n    _paq.push([\\'setTrackerUrl\\', u+\\'piwik\\']);\\n    _paq.push([\\'setSiteId\\', \\'100001\\']);\\n    var d=document, g=d.createElement(\\'script\\'), s=d.getElementsByTagName(\\'script\\')[0]; \\n    g.type=\\'text/javascript\\';\\n    g.defer=true; \\n    g.async=true; \\n    g.src=p+\\'://s.doubanio.com/dae/fundin/piwik.js\\';\\n    s.parentNode.insertBefore(g,s);\\n  })();\\n</script>\\n\\n<script type=\"text/javascript\">\\nvar setMethodWithNs = function(namespace) {\\n  var ns = namespace ? namespace + \\'.\\' : \\'\\'\\n    , fn = function(string) {\\n        if(!ns) {return string}\\n        return ns + string\\n      }\\n  return fn\\n}\\n\\nvar gaWithNamespace = function(fn, namespace) {\\n  var method = setMethodWithNs(namespace)\\n  fn.call(this, method)\\n}\\n\\nvar _gaq = _gaq || []\\n  , accounts = [\\n      { id: \\'UA-7019765-1\\', namespace: \\'douban\\' }\\n    , { id: \\'UA-7019765-16\\', namespace: \\'\\' }\\n    ]\\n  , gaInit = function(account) {\\n      gaWithNamespace(function(method) {\\n        gaInitFn.call(this, method, account)\\n      }, account.namespace)\\n    }\\n  , gaInitFn = function(method, account) {\\n      _gaq.push([method(\\'_setAccount\\'), account.id])\\n\\n      \\n  _gaq.push([method(\\'_addOrganic\\'), \\'google\\', \\'q\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'baidu\\', \\'wd\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'soso\\', \\'w\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'youdao\\', \\'q\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'so.360.cn\\', \\'q\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'sogou\\', \\'query\\'])\\n  if (account.namespace) {\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'豆瓣\\'])\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'douban\\'])\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'豆瓣网\\'])\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'www.douban.com\\'])\\n  }\\n\\n      if (account.namespace === \\'douban\\') {\\n        _gaq.push([method(\\'_setDomainName\\'), \\'.douban.com\\'])\\n      }\\n\\n        _gaq.push([method(\\'_setCustomVar\\'), 1, \\'responsive_view_mode\\', \\'desktop\\', 3])\\n\\n        _gaq.push([method(\\'_setCustomVar\\'), 2, \\'login_status\\', \\'0\\', 2]);\\n\\n      _gaq.push([method(\\'_trackPageview\\')])\\n    }\\n\\nfor(var i = 0, l = accounts.length; i < l; i++) {\\n  var account = accounts[i]\\n  gaInit(account)\\n}\\n\\n\\n;(function() {\\n    var ga = document.createElement(\\'script\\');\\n    ga.src = (\\'https:\\' == document.location.protocol ? \\'https://ssl\\' : \\'http://www\\') + \\'.google-analytics.com/ga.js\\';\\n    ga.setAttribute(\\'async\\', \\'true\\');\\n    document.documentElement.firstChild.appendChild(ga);\\n})()\\n</script>\\n\\n\\n\\n\\n\\n\\n\\n\\n    <!-- dae-web-book--default-5777c958f4-wqdj6-->\\n\\n</body>\\n</html>\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n'"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "html"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "beda3060",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T16:52:41.828390Z",
     "start_time": "2023-08-08T16:52:41.782914Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[{'book_name': '顾城的诗', 'authors': '顾城 ', 'publisher': '人民文学出版社', 'pub_time': ' 1998-12 ', 'desc': '火焰是我们诗歌唯一的读者', 'score': '8.8', 'people_num': '26009', 'price': ' 20.00'}, {'book_name': '会饮篇', 'authors': '[古希腊] 柏拉图  王太庆 ', 'publisher': '商务印书馆', 'pub_time': ' 2013-1 ', 'desc': '', 'score': '9.3', 'people_num': '11008', 'price': ' 12.00元'}, {'book_name': '众病之王 : 癌症传', 'authors': '[美] 悉达多·穆克吉  李虎 ', 'publisher': '中信出版社', 'pub_time': ' 2013-2 ', 'desc': '癌症传', 'score': '9.0', 'people_num': '12983', 'price': ' 42.00元'}, {'book_name': '火星救援', 'authors': '[美]安迪•威尔  陈灼 ', 'publisher': '译林出版社', 'pub_time': ' 2015-10 ', 'desc': '跟火星来一场不是你死就是我活的过家家游戏', 'score': '8.9', 'people_num': '19457', 'price': ' 38.00'}, {'book_name': '父权制与资本主义', 'authors': '[日] 上野千鹤子  邹韵 ', 'publisher': '浙江大学出版社', 'pub_time': ' 2020-3 ', 'desc': '', 'score': '9.2', 'people_num': '16503', 'price': ' 58.00元'}, {'book_name': '上学记', 'authors': '何兆武 口述 ', 'publisher': '生活·读书·新知三联书店', 'pub_time': ' 2006-8 ', 'desc': '20世纪中国知识分子的心灵史', 'score': '8.9', 'people_num': '14001', 'price': ' 19.80元'}, {'book_name': '总统是靠不住的 : 近距离看美国之二', 'authors': '林达 ', 'publisher': '生活·读书·新知三联书店', 'pub_time': ' 2004-08 ', 'desc': '美国政治法律制度的基本原理和操作细节', 'score': '8.8', 'people_num': '20808', 'price': ' 21.80'}, {'book_name': '李光耀观天下', 'authors': '李光耀 ', 'publisher': '北京大学出版社', 'pub_time': ' 2015-6 ', 'desc': '', 'score': '9.2', 'people_num': '11849', 'price': ' 58.00元'}, {'book_name': '毛姆短篇小说精选集', 'authors': '[英] 威廉·萨默塞特·毛姆  冯亦代 ', 'publisher': '译林出版社', 'pub_time': ' 2012-11 ', 'desc': '在各种光怪陆离的场景中，迷失的人性引发了一连串的悲剧', 'score': '9.1', 'people_num': '12445', 'price': ' 36.00元'}, {'book_name': '目送', 'authors': '龙应台 ', 'publisher': '生活·读书·新知三联书店', 'pub_time': ' 2009-10 ', 'desc': '不必追', 'score': '8.6', 'people_num': '210667', 'price': ' 39.00元'}, {'book_name': '规训与惩罚 : 监狱的诞生', 'authors': '[法] 米歇尔·福柯  刘北成 ', 'publisher': '生活·读书·新知三联书店', 'pub_time': ' 2003-1 ', 'desc': '伴随着惩罚的人性化，自由反而日益丧失了', 'score': '9.3', 'people_num': '10528', 'price': ' 21.80元'}, {'book_name': '亲爱的安德烈', 'authors': '龙应台 ', 'publisher': '人民文学出版社', 'pub_time': ' 2008-12 ', 'desc': '弭平代沟，跨越文化阻隔', 'score': '8.6', 'people_num': '121023', 'price': ' 26.00'}, {'book_name': '时间的秩序', 'authors': '[意] 卡洛·罗韦利  杨光 ', 'publisher': '湖南科学技术出版社', 'pub_time': ' 2019-6 ', 'desc': '', 'score': '8.9', 'people_num': '21305', 'price': ' 56.00元'}, {'book_name': '金锁记', 'authors': '张爱玲 ', 'publisher': '哈尔滨出版社', 'pub_time': ' 2005-6 ', 'desc': '一个小商人家庭出身的女子曹七巧的心灵变迁历程', 'score': '8.6', 'people_num': '61948', 'price': ' 13.5元'}, {'book_name': '从一到无穷大 : 科学中的事实和臆测', 'authors': '[美] G. 伽莫夫  暴永宁 译 ', 'publisher': '科学出版社', 'pub_time': ' 2002-11 ', 'desc': '科学中的事实和臆测', 'score': '9.1', 'people_num': '13875', 'price': ' 29.00元'}, {'book_name': '认识电影 : 插图第11版', 'authors': '[美] 路易斯·贾内梯  焦雄屏 ', 'publisher': '世界图书出版公司', 'pub_time': ' 2007-11 ', 'desc': '电影入门经典之作', 'score': '8.9', 'people_num': '18370', 'price': ' 68.00元'}, {'book_name': '分成两半的子爵', 'authors': '[意] 伊塔洛·卡尔维诺  吴正仪 ', 'publisher': '译林出版社', 'pub_time': ' 2012-4-1 ', 'desc': '', 'score': '8.8', 'people_num': '26354', 'price': ' 20.00元'}, {'book_name': '帷幕 : 阿加莎·克里斯蒂侦探作品集33', 'authors': '[英] 阿加莎·克里斯蒂  李杨 ', 'publisher': '新星出版社', 'pub_time': ' 2015-2 ', 'desc': '', 'score': '9.1', 'people_num': '14610', 'price': ' 26.00'}, {'book_name': '跨越边界的社区（修订版） : 北京“浙江村”的生活史', 'authors': '项飙 ', 'publisher': '生活·读书·新知三联书店', 'pub_time': ' 2018-3 ', 'desc': '', 'score': '9.5', 'people_num': '9005', 'price': ' 68.00元'}, {'book_name': '坟', 'authors': '鲁迅 ', 'publisher': '人民文学出版社', 'pub_time': ' 2006-12 ', 'desc': '', 'score': '9.6', 'people_num': '11445', 'price': ' 16.00元'}, {'book_name': '中国哲学简史', 'authors': '冯友兰  赵复三 ', 'publisher': '新世界出版社', 'pub_time': ' 2004-1 ', 'desc': '中国哲学入门书', 'score': '8.9', 'people_num': '19942', 'price': ' 38.00元'}, {'book_name': '青铜时代 : 时代三部曲', 'authors': '王小波 ', 'publisher': '花城出版社', 'pub_time': ' 1997-5 ', 'desc': '唐人传奇贯注现代情趣', 'score': '8.8', 'people_num': '26772', 'price': ' 29.00元'}, {'book_name': '荆棘鸟', 'authors': '[澳] 考琳·麦卡洛  曾胡 ', 'publisher': '译林出版社', 'pub_time': ' 1998-7 ', 'desc': '澳洲乱世情', 'score': '8.6', 'people_num': '51943', 'price': ' 28.00元'}, {'book_name': '黑箱：日本之耻', 'authors': '[日]伊藤诗织  匡匡  雅众文化', 'publisher': '中信出版集团', 'pub_time': ' 2019-4 ', 'desc': '', 'score': '8.9', 'people_num': '22009', 'price': ' 48.00元'}, {'book_name': '如父如子', 'authors': '[日] 是枝裕和  丹勇 ', 'publisher': '湖南文艺出版社', 'pub_time': ' 2018-4 ', 'desc': '', 'score': '8.9', 'people_num': '26333', 'price': ' 49.80'}]\n",
      "书籍数量为： 25\n"
     ]
    }
   ],
   "source": [
    "# 调用函数extract_bookinfo_list(html)\n",
    "bookinfo_list = extract_bookinfo_list(html)\n",
    "print(bookinfo_list)\n",
    "print('书籍数量为：', len(bookinfo_list))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "84e4e3ce",
   "metadata": {},
   "source": [
    "# 存储数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "40bbcd27",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T16:52:42.734046Z",
     "start_time": "2023-08-08T16:52:42.727339Z"
    }
   },
   "outputs": [],
   "source": [
    "import csv     # 导入csv包\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "# 打开文件\n",
    "file = open('./data/books_250.csv', 'a+', encoding='utf-8', newline='') # 文件名为books_philosophy.csv，模式为a+，如果已有文件，在末尾追加，如果没，则生成新文件；编码为utf-8，需要区分换行符\n",
    "fieldnames = ['book_name', 'authors', 'publisher', 'pub_time', 'desc', 'score', 'people_num', 'price']  # 设置标题行fieldnames\n",
    "writer = csv.DictWriter(file, fieldnames=fieldnames)    # 要求以字典的形式写入数据，fieldnames注明字典中键的名称，也就是书名、作者这些标题名\n",
    "writer.writeheader()  # 将fieldnames设置的标题key写入首行\n",
    "\n",
    "# 循环写入字典列表：因为有很多本书，需要一行行写入\n",
    "for bookinfo in bookinfo_list:\n",
    "    writer.writerow(bookinfo)  # 写入一行书籍信息\n",
    "    \n",
    "file.close() # 关闭文件"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "10109014",
   "metadata": {},
   "source": [
    "# 批量爬取"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a901cf92",
   "metadata": {},
   "source": [
    "刚才我们做了几项工作：\n",
    "1. 生成网址————发现网址规律，获得所有网址url_list\n",
    "2. 请求+获取网页数据————获得html网页源代码字符串（**单个网址**）\n",
    "3. 解析数据————从html中获得书籍的各字段信息，存储为字典列表（**单个网址**）\n",
    "4. 存储数据（**单个网址**）\n",
    "<br>\n",
    "<br>\n",
    "<br>\n",
    "<b><mark>下面对所有网址url_list循环步骤2-4</mark><b>"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a9fb1617",
   "metadata": {},
   "source": [
    "|**步骤**|任务|函数|输入参数|返回值|\n",
    "|:----:|:-----|:-----|:-----|:-----|\n",
    "|1|生成网址|**|--|url_list网址列表|\n",
    "|**<mark>2</mark>**|**<mark>请求+获取网页数据</mark>**|get_html(url)|单个网址|html网页源代码的字符串|\n",
    "|**<mark>3</mark>**|**<mark>解析数据</mark>**|extract_bookinfo_list(html)|（单个网址）html网页源代码的字符串|bookinfo_list书籍的字典列表|\n",
    "|**<mark>4</mark>**|**<mark>存储数据</mark>**|--|--|--|\n",
    "|5|批量爬取|--|--|--|"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "4b22f83a",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T16:52:44.747190Z",
     "start_time": "2023-08-08T16:52:44.739198Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['https://book.douban.com/top250?start=0',\n",
       " 'https://book.douban.com/top250?start=25',\n",
       " 'https://book.douban.com/top250?start=50',\n",
       " 'https://book.douban.com/top250?start=75',\n",
       " 'https://book.douban.com/top250?start=100',\n",
       " 'https://book.douban.com/top250?start=125',\n",
       " 'https://book.douban.com/top250?start=150',\n",
       " 'https://book.douban.com/top250?start=175',\n",
       " 'https://book.douban.com/top250?start=200',\n",
       " 'https://book.douban.com/top250?start=225']"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "url_list = []\n",
    "template = 'https://book.douban.com/top250?start={num}'\n",
    "for p in range(1,11):   # range取1到11\n",
    "    url = template.format(num=(p-1)*25)\n",
    "    url_list.append(url)\n",
    "url_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "b3fcbcaa",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T16:52:50.626972Z",
     "start_time": "2023-08-08T16:52:45.215501Z"
    }
   },
   "outputs": [],
   "source": [
    "# 打开文件\n",
    "file = open('./data/books_250.csv', 'a+', encoding='utf-8', newline='') \n",
    "fieldnames = ['book_name', 'authors', 'publisher', 'pub_time', 'desc', 'score', 'people_num', 'price'] \n",
    "writer = csv.DictWriter(file, fieldnames=fieldnames)    \n",
    "writer.writeheader() \n",
    "\n",
    "# 对所有网址url_list循环步骤2-4\n",
    "for url in url_list:\n",
    "    \n",
    "    html = get_html(url)       # 【步骤2：得到html数据，用函数get_html(url)】\n",
    "    \n",
    "    bookinfo_list = extract_bookinfo_list(html)  # 【步骤3：整理成结构化数据，用函数extract_bookinfo_list(html)】\n",
    "    \n",
    "    for bookinfo in bookinfo_list:      # 【步骤4：写数据到csv文件】\n",
    "        writer.writerow(bookinfo)\n",
    "    \n",
    "file.close() # 关闭文件"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "681de3ed",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2023-08-08T16:53:08.861895Z",
     "start_time": "2023-08-08T16:53:08.855334Z"
    }
   },
   "outputs": [],
   "source": [
    "# 函数：爬虫主函数  main(filename)\n",
    "# 参数说明：filename为文件名称\n",
    "# 仅执行命令，不返回任何值\n",
    "def main(filename):         # 添加：定义函数名\n",
    "    print('开始采集豆瓣读书top 250书籍！')              # 添加：说明“开始采集豆瓣读书top 250书籍！”\n",
    "    \n",
    "    # 生成所有网址url_list\n",
    "    url_list = generate_url()\n",
    "    \n",
    "    # 打开文件\n",
    "    file = open(filename, 'a+', encoding='utf-8', newline='')     # 修改：将文件名称，设定为函数的参数\n",
    "    fieldnames = ['book_name', 'authors', 'publisher', 'pub_time', 'desc', 'score', 'people_num', 'price'] \n",
    "    writer = csv.DictWriter(file, fieldnames=fieldnames)    \n",
    "    writer.writeheader() \n",
    "\n",
    "    # 对所有网址url_list循环步骤2-4\n",
    "    for url in url_list:\n",
    "        print('正在采集：{url}'.format(url=url))    # 添加：说明“正在采集<url>”\n",
    "        html = get_html(url)\n",
    "        bookinfo_list = extract_bookinfo_list(html)\n",
    "        for bookinfo in bookinfo_list:\n",
    "            writer.writerow(bookinfo)\n",
    "\n",
    "    file.close()\n",
    "\n",
    "    print('采集完毕！')            # 添加：说明“采集完毕！”"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "开始采集豆瓣读书top 250书籍！\n",
      "正在采集：https://book.douban.com/top250?start=0\n",
      "正在采集：https://book.douban.com/top250?start=25\n",
      "正在采集：https://book.douban.com/top250?start=50\n",
      "正在采集：https://book.douban.com/top250?start=75\n",
      "正在采集：https://book.douban.com/top250?start=100\n",
      "正在采集：https://book.douban.com/top250?start=125\n",
      "正在采集：https://book.douban.com/top250?start=150\n",
      "正在采集：https://book.douban.com/top250?start=175\n",
      "正在采集：https://book.douban.com/top250?start=200\n",
      "正在采集：https://book.douban.com/top250?start=225\n",
      "采集完毕！\n"
     ]
    }
   ],
   "source": [
    "main(filename='./data/books_250.csv')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dd09a1fe",
   "metadata": {},
   "source": [
    "# 参考：\n",
    "- [Excel打开监控数据CSV文件乱码如何处理？_云监控服务 CES_常见问题_产品咨询_华为云 ](https://support.huaweicloud.com/ces_faq/ces_faq_0018.html)"
   ]
  }
 ],
 "metadata": {
  "celltoolbar": "原始单元格格式",
  "hide_input": false,
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "213.788px"
   },
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
